Reputation: 5434
I'm trying to debug an issue that's causing a crash and the multithreading is complicating my troubleshooting. How do I turn off multithreading for the Windows branch of Caffe in Visual Studio?
Upvotes: 0
Views: 104
Reputation: 802
As of v1.0.1, torch.set_num_threads(1)
covers everything, including the BLAS libraries.
I tested it on PyTorch 1.6 and Python 3.6 and it received a total of 3 threads (including 1 for Python).
source: https://github.com/pytorch/pytorch/issues/16899
Upvotes: 1