Search code examples
caffe

How to turn off multithreading on Caffe for Visual Studio?


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?


Solution

  • 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