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

Support multiple streams in one core #28245

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

sunxiaoxia2022
Copy link
Contributor

@sunxiaoxia2022 sunxiaoxia2022 commented Jan 2, 2025

Details:

  • add cores_limit parameter into IStreamsExecutor::Config()

Tickets:

@sunxiaoxia2022 sunxiaoxia2022 requested review from a team as code owners January 2, 2025 07:59
@github-actions github-actions bot added category: inference OpenVINO Runtime library - Inference category: CPU OpenVINO CPU plugin labels Jan 2, 2025
if (_streams == 0) {
set_config_zero_stream();
return;
}

_threads_per_stream =
_threads_per_stream > 0 ? std::min(num_cores, _streams * _threads_per_stream) / _streams : 0;
(_threads_per_stream > 0 && _cores_limit) ? std::min(num_cores, _streams * _threads_per_stream) / _streams : 0;
Copy link
Contributor

@wangleis wangleis Jan 6, 2025

Choose a reason for hiding this comment

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

If num_cores is less than num_streams, CPU reservation should be disabled as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, CPU reservation and CPU pinning must be all disabled.

@sunxiaoxia2022 sunxiaoxia2022 requested review from a team as code owners January 6, 2025 06:52
@github-actions github-actions bot added the category: GPU OpenVINO GPU plugin label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPU OpenVINO CPU plugin category: GPU OpenVINO GPU plugin category: inference OpenVINO Runtime library - Inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants