Ensure num_threads is initialized before calling omp_get_max_threads (#60185)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/60185
`get_num_threads` is usually called before `parallel_for` so there's no
guaruntee we've initialized `num_threads` properly.
Test Plan: Imported from OSS
Reviewed By: albanD
Differential Revision: D29287814
Pulled By: ngimel
fbshipit-source-id: 7e9c86fc32d63889a57a9b1d2b7d8f3863481dce