pytorch / 2 / generated / torch.set_num_interop_threads.html

torch.set_num_interop_threads

torch.set_num_interop_threads(int)

Sets the number of threads used for interop parallelism (e.g. in JIT interpreter) on CPU.

Warning

Can only be called once and before any inter-op parallel work is started (e.g. JIT execution).

© 2024, PyTorch Contributors
PyTorch has a BSD-style license, as found in the LICENSE file.
https://pytorch.org/docs/2.1/generated/torch.set_num_interop_threads.html