torch.set_num_interop_threads¶ torch.set_num_interop_threads(int)¶ 设置用于 CPU 上交互并行(例如在 JIT 解释器中)的线程数。 警告 只能调用一次,并且在开始任何互操作并行工作之前(例如 JIT 执行)。