Set caffe2::pthreadpool() size in ParallelOpenMP (#45566)
Summary:
Addresses https://github.com/pytorch/pytorch/issues/45418.
This is probably not the best solution, but it's a rebase of the solution we're considering until https://github.com/pytorch/pytorch/issues/45418 is solved. If you can outline a better one I'm willing to implement it (:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/45566
Reviewed By: ezyang
Differential Revision: D24621568
Pulled By: glaringlee
fbshipit-source-id: 89dad5c61d8b5c26984d401551a1fe29df1ead04