Commit 053b153
threading: support for GGML_SCHED_PRIO_LOW, update thread info on Windows to avoid throttling (ggml-org#12995)
* threading: support for GGML_SCHED_PRIO_LOW, update thread info on Windows 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]>
* threading: disable SetThreadInfo() calls for older Windows versions
* Update tools/llama-bench/llama-bench.cpp
Co-authored-by: Diego Devesa <[email protected]>
---------
Co-authored-by: Diego Devesa <[email protected]>1 parent b3a89c3 commit 053b153
File tree
5 files changed
+29
-3
lines changed- common
- ggml
- include
- src/ggml-cpu
- tools/llama-bench
5 files changed
+29
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1348 | 1348 | | |
1349 | 1349 | | |
1350 | 1350 | | |
1351 | | - | |
| 1351 | + | |
1352 | 1352 | | |
1353 | | - | |
| 1353 | + | |
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| 206 | + | |
206 | 207 | | |
207 | 208 | | |
208 | 209 | | |
| |||
228 | 229 | | |
229 | 230 | | |
230 | 231 | | |
| 232 | + | |
231 | 233 | | |
232 | 234 | | |
233 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2181 | 2181 | | |
2182 | 2182 | | |
2183 | 2183 | | |
| 2184 | + | |
2184 | 2185 | | |
2185 | 2186 | | |
2186 | 2187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2418 | 2418 | | |
2419 | 2419 | | |
2420 | 2420 | | |
| 2421 | + | |
2421 | 2422 | | |
2422 | 2423 | | |
2423 | 2424 | | |
2424 | 2425 | | |
2425 | 2426 | | |
2426 | 2427 | | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
| 2431 | + | |
| 2432 | + | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
| 2439 | + | |
| 2440 | + | |
| 2441 | + | |
| 2442 | + | |
| 2443 | + | |
| 2444 | + | |
| 2445 | + | |
| 2446 | + | |
2427 | 2447 | | |
2428 | 2448 | | |
2429 | 2449 | | |
| |||
2451 | 2471 | | |
2452 | 2472 | | |
2453 | 2473 | | |
| 2474 | + | |
| 2475 | + | |
2454 | 2476 | | |
2455 | 2477 | | |
2456 | 2478 | | |
| |||
2507 | 2529 | | |
2508 | 2530 | | |
2509 | 2531 | | |
| 2532 | + | |
2510 | 2533 | | |
2511 | 2534 | | |
2512 | 2535 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| |||
0 commit comments