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