Use torch::get/set_num_threads without additional includes beyond torch/torch.h (#20176)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/20130.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/20176
Differential Revision: D15275036
Pulled By: yf225
fbshipit-source-id: 0f04e1fbfed18c07030b20e92e957ef5f2b5707d