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