Fix init_thread calls in thread pool initialization (#20848)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20848
ghimport-source-id: e542858a198252838c1f3100dbfbe90fd3960f07
Differential Revision: D15466918
Pulled By: ilia-cher
fbshipit-source-id: e75d38f51edd5b508c4ca28a292e4141e90f209f