Visual Studio 如何在 Caffe 上关闭多线程?

How to turn off multithreading on Caffe for Visual Studio?

我正在尝试调试导致崩溃的问题,而多线程使我的故障排除变得复杂。如何在 Visual Studio 中关闭 Caffe Windows 分支的多线程?

从 v1.0.1 开始,torch.set_num_threads(1) 涵盖了所有内容,包括 BLAS 库。 我在 PyTorch 1.6 和 Python 3.6 上对其进行了测试,它总共收到了 3 个线程(其中 1 个用于 Python)。

来源:https://github.com/pytorch/pytorch/issues/16899