Limit overall number of threads used by TBB (#22045)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/22045
ghimport-source-id: ea49ae04d86677f7a73a07968ce454eb1128fb84
Test Plan:
PARALLEL_BACKEND=NATIVE_TBB USE_OPENMP=0 USE_TBB=1 MKL_SEQ=1
MKLDNN_THREADING=SEQ USE_CUDA=0 BLAS=MKL USE_MKLDNN=1 BUILD_BINARY=1
python setup.py develop --cmake
./build/bin/parallel_info
./build/bin/thread_init_test
./build/bin/test_parallel
Imported from OSS
Differential Revision: D15930319
Pulled By: ilia-cher
fbshipit-source-id: 4c33ae395965e5708f8d7ceb67495b303fc4d22c