Skip to content

[BUG] cli default args for num_threads should be based on process thread affinity. #30

Closed
@cwharris

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.

https://github.com/NVIDIA/Morpheus/blob/02bfbfbeb6e9e62d5fd8fe47a2bf2a92a85d1adc/examples/gnn_fraud_detection_pipeline/run.py#L36-L41

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

  • Status

    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions