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

Reserving CPU resource in CPU inference #27321

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

Conversation

sunxiaoxia2022
Copy link
Contributor

@sunxiaoxia2022 sunxiaoxia2022 commented Oct 30, 2024

Details:

  • Add property ov::hint::enable_cpu_reservation to reserve CPU resource in CPU inference
  • ov::hint::enable_cpu_reservation defaults to false, user can explicitly set it to true to enable CPU reservation.

Tickets:

@sunxiaoxia2022 sunxiaoxia2022 requested review from a team as code owners October 30, 2024 01:49
@github-actions github-actions bot added category: inference OpenVINO Runtime library - Inference category: GPU OpenVINO GPU plugin category: CPU OpenVINO CPU plugin category: CPP API OpenVINO CPP API bindings labels Oct 30, 2024
}
}
if (get_property(ov::hint::enable_cpu_reservation) && !get_property(ov::hint::enable_cpu_pinning)) {
set_property(ov::hint::enable_cpu_pinning(true));
Copy link
Contributor

Choose a reason for hiding this comment

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

Why we need this logic here? User can set enable_cpu_reservation to true and enable_cpu_pinning to false.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think if enable_cpu_reservation is true, enable_cpu_pinning must be true. Because reserving cpus means pinning tasks to fixed cpus firstly, then reserving these cpus.

Copy link
Contributor

Choose a reason for hiding this comment

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

User still can use enable_cpu_reservation true with enable_cpu_pinning false together. Then the next model only can use remained CPU cores for latency/throughput hit.

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, done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: CPP API OpenVINO CPP API bindings 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