open3d.utility.set_max_threads#
- open3d.utility.set_max_threads(num_threads: SupportsInt) None#
Limit the total number of CPU threads Open3D may use.
Open3D uses oneAPI TBB for CPU parallelism, which has no
OMP_NUM_THREADSequivalent. Use this function to bound Open3D’s thread usage, for example when running several Open3D calls in parallel worker processes.The limit applies process-wide and remains in effect until changed. Pass
0to remove the limit and restore the automatic default.Example
Restrict Open3D to a single thread:
import open3d as o3d o3d.utility.set_max_threads(1)
- Parameters:
num_threads (SupportsInt) – Maximum number of threads, including the calling thread. Must be >= 1, or 0 to remove a previously set limit.
- Returns:
None