Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: limit CPU usage for VAD onnxruntime inference session by setting… #215

Merged
merged 1 commit into from
May 24, 2024

Conversation

makaveli10
Copy link
Collaborator

This PR introduces an enhancement to control the number of threads used by OpenMP via the OMP_NUM_THREADS environment variable, which by default is set to 1 and can also be controlled via a command-line argument.

Screenshot from 2024-05-24 14-39-12

ONNX Runtime and OpenMP
onnxruntime uses OpenMP for parallelism to improve performance on multi-core systems. By setting OMP_NUM_THREADS, we can control the number of threads used during the execution of ONNX models, ensuring efficient resource utilization and predictable performance.

Fixes #201

Copy link
Contributor

@zoq zoq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@makaveli10 makaveli10 merged commit c0a947a into collabora:main May 24, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

GPU mode consumes half of available CPUs
2 participants