Skip to content

threading: support for GGML_SCHED_PRIO_LOW, update thread info on Windows to avoid throttling #12995

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

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

Conversation

max-krasnyansky
Copy link
Collaborator

We talked about adding LOW priority for GGML threads in the original threadpool PR. It might be useful for some cases to avoid contention.

Latest Windows ARM64 releases started parking (offlining) the CPU cores more aggresively which results in suboptimal performance with n_threads > 4. To deal with that we now disable Power Throttling for our threads for the NORMAL and higher priorities.

Make sure to read the contributing guidelines before submitting a PR

@github-actions github-actions bot added examples ggml changes relating to the ggml tensor library for machine learning labels Apr 17, 2025
@max-krasnyansky max-krasnyansky force-pushed the maxk/sched-prio-updates branch 2 times, most recently from bced6ad to b4458d4 Compare April 17, 2025 16:45
@max-krasnyansky max-krasnyansky force-pushed the maxk/sched-prio-updates branch from a157d1b to 854252f Compare April 17, 2025 21:17
@max-krasnyansky max-krasnyansky marked this pull request as ready for review April 17, 2025 21:34
@max-krasnyansky max-krasnyansky force-pushed the maxk/sched-prio-updates branch from 854252f to 9d4b917 Compare April 17, 2025 21:42
max-krasnyansky and others added 2 commits April 18, 2025 13:40
…dows to avoid throttling

We talked about adding LOW priority for GGML threads in the original threadpool PR.
It might be useful for some cases to avoid contention.

Latest Windows ARM64 releases started parking (offlining) the CPU cores
more aggresively which results in suboptimal performance with n_threads > 4.
To deal with that we now disable Power Throttling for our threads for the NORMAL
and higher priorities.

Co-authored-by: Diego Devesa <[email protected]>
@max-krasnyansky max-krasnyansky force-pushed the maxk/sched-prio-updates branch from 9d4b917 to f155d23 Compare April 18, 2025 20:44
@slaren
Copy link
Member

slaren commented Apr 22, 2025

The CI failure here is a bit weird.. it is actually using mingw rather than MSVC, and the problem seems to be that this version of mingw does not support this API at all. We should just remove the msvc-arm64 build from the CI, along with the arm64-windows-msvc.cmake toolchain file, since it doesn't work, and this configuration is no longer supported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples ggml changes relating to the ggml tensor library for machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants