mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #5215] [Engine] The CPU share limit stays at 1,536 on a K-quant gfx12 model that never runs the fused IQ kernels #3106
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#3106
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sdroege on GitHub (Nov 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5215
Area
[Engine] (speed, kernels, models, the server and API)
Desktop app, Terminal or source?
Source (START-HERE.bat, setup.sh or a build)
What happened
On gfx12 the CPU prefill share is on by default, but its limit is 1,536 tokens. That limit exists so a chunk from 1,536 up streams all experts and runs the fused IQ2_S/IQ4_XS gate/up kernels. A K-quant model never runs those kernels but still gets the lower limit.
Measured on UD-Q4_K_XL, 3 rounds, 2K prompt, same start otherwise:
STRATA_PREFILL_CPU_SHARE_MAX=3072)That is +9.4% at 2K, consistent in all three rounds. 1K, 4K, 32K and 98K were unchanged, and the 4K and up prompts are above both limits by construction.
Cause (static analysis).
src/prefill/prefill.cpp:2862sets the limit fromshare_rules::gfx12_share_limit(fused::gfx12_iq2s_default()), andinclude/strata/prefill/share_rules.hpp:31returns 1,536 when that flag is on and 3,072 otherwise. The flag is a build and architecture default, not a property of the model in use.Expected: a model whose gate/up experts are not IQ2_S/IQ4_XS keeps the 3,072 limit.
Actual: 1,536, so 1.5K to 3K prompts get no share.
Related: #3923 (CPU share arming on a 32 GB PC; different cause).
Proposed fix: thread the model's gate/up expert type to the arm point, or make the limit depend on whether the model actually uses IQ2_S/IQ4_XS.
Smallest steps or command that reproduce it
--prefill autoand noSTRATA_PREFILL_CPU_SHARE_MAX.prefill: the CPU share is ON by default for prompt chunks up to 1536 tokens.STRATA_PREFILL_CPU_SHARE_MAX=3072and compare a 2K prompt.Reproduction status
Reproduced locally for the speed difference; the code cause above is unconfirmed static analysis.
Strata version
Strata 0.2.10, engine 0.1.56
Graphics card, memory and system
Radeon AI PRO R9700 32 GB, 121.5 GiB RAM, Fedora 44 (kernel 7.2.13-200.fc44.x86_64)