mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4938] [Engine] 0.2.9 iq_kernels 160-dot fastpath inflates VGPR for all non-trellis types (-12% batch decode) #2273
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#2273
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 @hyz1848 on GitHub (Nov 1, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4938
Hardware:
Environment: Strata 0.1.55 (0.2.9 source), 2x RX 7900 XTX (gfx1100), ROCm 10.3 nightly SDK, Qwen3.8-Flash-Next IQ3_S pack, --batch 4, --layer-split, spec+MTP.
What happened: row_dot_multi() (src/kernels/cuda/iq_kernels.cu) gained a
prefetch fastpath guarded by a RUNTIME check
if (nb * F::ipb == 160).The check never fires for the IQ types (at n_embd 2560 their row dot count is
80/40, never 160), but the branch is still instantiated for every Split type.
Registers are allocated per worst-path, so the dead path raises the kernel's
VGPR requirement for ALL instantiations.
Static evidence (gfx1100 code object, 485 kernels):
0.2.8 binary: VGPR avg 76.3, spill avg 0.10
0.2.9 binary: VGPR avg 114.9, spill avg 0.60
mmvq_multi family total instrs: 100,615 -> 353,169 (3.5x)
Same source compiled with both clang snapshots behaves the same: it is the
source shape, not the compiler.
Measured effect: 4-concurrency growing-conversation decode, live aggregate
throughput dropped 160 -> 140 tok/s between 0.1.54 and 0.1.55 on IQ3_S.
No functional diff (correctness unaffected).
Suggested fix (verified on this box): gate the fastpath with if constexpr so
it is only compiled for the trellis types it was written for:
if constexpr (kTqType || TY == 147 || TY == 148 || TY == 149) {
if (nb * F::ipb == 160) { ... }
}
Rebuild result: VGPR avg 115 -> 89, spill 0.6 -> 0.10, live median 140 ->
149.5 (peak 162.4), batch rows/s 36.9 -> 93.9 on the same workload.
Trellis types keep the fastpath untouched.
@github-actions[bot] commented on GitHub (Nov 1, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Nov 1, 2026):
Thanks, this follows the format now.
@github-actions[bot] commented on GitHub (Nov 1, 2026):
Thanks, this follows the format now.