[BUG] cli default args for num_threads should be based on process thread affinity. #30
Closed
Description
We are using os.cpu_count()
(or psutil.cpu_count()
) as the default argument for num_threads
for both CLI and example code, which is based on the physical number of CPUs on the device and is potentially non-determinable.
Instead we should probably use len(os.sched_getaffinity(0))
, which looks to be the appropriate default as it accounts for how many threads the current process has access to.
Metadata
Assignees
Labels
Type
Projects
Status
Done
Activity