Relax restrictions on set_num_threads (#27190)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27190
Allow set_num_threads to be called multiple times in case of TBB
parallel backend
Test Plan:
BUILD_BINARY=1 USE_TBB=1 ATEN_THREADING=TBB python setup.py develop
install --cmake
./build/bin/test_parallel
./build/bin/thread_init_test
Reviewed By: kostmo
Differential Revision: D17704236
Pulled By: ilia-cher
fbshipit-source-id: 274380795e78ba417301c5faa18c9e9d3198bd5e