[PR #209] calibrate: try the host's extra CPU-thread candidates above the engine's own too #393

Closed
opened 2026-10-29 21:24:59 +07:00 by bsakaguchi · 0 comments
Owner

Original Pull Request: https://github.com/mw00/project-maya/pull/209

State: closed
Merged: No


The thread sweep only ever tried counts below the engine's own. host_thread_extras() computes one socket's CPUs less one on a 2-socket PC (and the performance cores' CPUs less one on a hybrid one), but the candidate filter 2 <= w < default dropped that candidate whenever it was larger than the default - and on a split of three or more GPUs the engine sizes its one pool from one NUMA node's physical cores, so that is exactly the case the extra exists for.

The sweep now keeps the extras above the default too (never equal to it, never below 2). The early stop and the interleaved confirmation are unchanged: a count is still kept only when it beats the engine's own by more than 3%, so this only widens what can be measured, never what is kept on noise.

Measured on the reporter's box while tuning it - 3x Tesla V100-PCIE-16GB, 2x Xeon E5-2690 v4 (two sockets, 28 physical cores), 62 GB RAM, Maya-S-v2-IQ2_XXS, 128K context, --bench decode means, VRAM_EVICT=lru (through the config env):

CPU threads run 1 run 2
engine's own (14 - one node) 26.6 27.2
24 25.8 26.4
27 (this host's extra: one socket's CPUs less one) 25.6 -
28 25.6 -

On this box the extras did not clear the 3% bar (the run-to-run spread of a config is about +-3%), so nothing would have been kept here either way - but the sweep can now see them, and on a host where they do win the tuning can keep them. python -m unittest tools.test_calibrate_glm passes (the thread-candidate test was updated for extras above the default).

**Original Pull Request:** https://github.com/mw00/project-maya/pull/209 **State:** closed **Merged:** No --- The thread sweep only ever tried counts **below** the engine's own. `host_thread_extras()` computes one socket's CPUs less one on a 2-socket PC (and the performance cores' CPUs less one on a hybrid one), but the candidate filter `2 <= w < default` dropped that candidate whenever it was larger than the default - and on a split of three or more GPUs the engine sizes its one pool from one NUMA node's physical cores, so that is exactly the case the extra exists for. The sweep now keeps the extras above the default too (never equal to it, never below 2). The early stop and the interleaved confirmation are unchanged: a count is still kept only when it beats the engine's own by more than 3%, so this only widens what can be measured, never what is kept on noise. Measured on the reporter's box while tuning it - 3x Tesla V100-PCIE-16GB, 2x Xeon E5-2690 v4 (two sockets, 28 physical cores), 62 GB RAM, Maya-S-v2-IQ2_XXS, 128K context, `--bench` decode means, `VRAM_EVICT=lru` (through the config env): | CPU threads | run 1 | run 2 | | --- | ---: | ---: | | engine's own (14 - one node) | 26.6 | 27.2 | | 24 | 25.8 | 26.4 | | 27 (this host's extra: one socket's CPUs less one) | 25.6 | - | | 28 | 25.6 | - | On this box the extras did not clear the 3% bar (the run-to-run spread of a config is about +-3%), so nothing would have been kept here either way - but the sweep can now see them, and on a host where they do win the tuning can keep them. `python -m unittest tools.test_calibrate_glm` passes (the thread-candidate test was updated for extras above the default).
bsakaguchi 2026-10-29 21:24:59 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#393
No description provided.