mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2018] [CLOSED] prefill: VGPR-capped gfx11 fused expert kernels back on for gfx1151 on clang 23 (same bits, 10-15% less time per layer for most IQ formats) #3810
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#3810
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2018
Author: @libratechw
Created: 10/12/2026
Status: ❌ Closed
Base:
main← Head:pr/gfx1151-vgpr-cap📝 Commits (1)
c2b1fc5prefill: the VGPR-capped gfx11 fused expert kernels are on again for gfx1151 on clang 23, except IQ2_XS gate/up and Q8_0 down (#1180)📊 Changes
1 file changed (+27 additions, -6 deletions)
View changed files
📝
src/prefill/moe_fused_iq.cu(+27 -6)📄 Description
Title
Issue: Refs #1180
Summary
Since 0.1.40.2 the
waves_per_eu(8)variant ofnative_w11_kernelis uncapped on clang 22 and newer, because clang 22computes wrong results with it on gfx1100 (#1180). On gfx1151 with clang 23 (ROCm 7.14.1) the capped kernels give the same
bits and take less time. This applies the cap there again, per format, and leaves every other architecture and compiler as
it is.
What changed
src/prefill/moe_fused_iq.cuonly, in its HIP-only part:NW_LBis the variant's template argument again (8, or-DSTRATA_W_LB=N), the same in the host and every device pass.nw_capped(WT)decides in the device pass whether the cap applies: always before clang 22 or with-DSTRATA_W_LB; ongfx1151 with clang 23 for every format the occupancy variant launches except IQ2_XS gate/up and Q8_0 down; otherwise not
(clang 22 and 24+, every other architecture).
Ryzen AI Max+ 395 (gfx1151, ROCm 7.14.1), on
296b59d2,hip_prefill_fused_iq --no-ref --only=<pair> --chunks=2048,3584,8192,one layer, top 10 over 512 experts,
fusedms, median of 3 (range); the output bits hash is the same as 296b59d2's in everycase. IQ2_XS gate/up stays uncapped, so its pair gains from the IQ4_NL down only:
296b59d2The two uncapped formats, with the cap forced on (
-DSTRATA_W_LB=8; spills from-Rpass-analysis=kernel-resource-usage):IQ2_XS gate/up spills 104 VGPRs and the IQ2_XS / IQ4_NL layer takes 74-78% more time; Q8_0 down spills 18 and Q4_K / Q8_0
moves -1.9% to +1.3%. The output hash is the same as uncapped.
Builds and tests on this branch:
296b59d2(ple_parity,expert_parity,pool_test).strata_kernels,strata_prefillandstrata_mmqcompile for gfx1012, gfx1030, gfx1100, gfx1103, gfx1150, gfx1151, gfx1200 and gfx1201.ple_parityfails as on296b59d2.Not run: gfx1100-1103 / gfx1150 cards, other clang 23 builds, and end to end. The fused experts are opt-in on gfx11
(
STRATA_PF_FUSED=1).🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.