Repository navigation
inkling2 on AMD: flash prefill without register spills under hipcc 7.16 - #426
Merged
Merged
Conversation
|
All contributors have signed the CLA. Thank you! |
hipcc 7.16 (runner toolchain, ROCm 7.16.26385) compiles the merged flash kernel to 256 VGPRs + 117-128 VGPR spill slots; hipcc 7.13 (framework) gives 234 VGPRs / 0 spills. With this change: fused softmax row staging (no tm/pv temporaries) + V staged as fp16 in LDS (numerics bit-identical to the old per-head kernel's V path). ISA after fix: 7.13 = 234 VGPR / 0 spills / 44KB LDS; 7.16 = 256 VGPR / 16 spill slots (residual spills in shfl_xor reduce blocks only). Bit-identical output in the standalone CPU-reference harness (q_len 1..4096, q_offset chunked, windows 0/16/64/1024). Runner prefill (Ryzen AI MAX+ 395, gfx1151, hipcc 7.16): main ~1,192/954 tok/s -> 1,327/1,174 tok/s (+11%/+23%). Framework prefill: 1,362 -> 1,525 @7.7K, 1,109 -> 1,383 @31k.
AzeezIsh
force-pushed
the
perf/inkling2-hip-flash-spills
branch
from
November 25, 2026 20:36
5783098 to
1809389
Compare
Contributor
Author
Runner gates at
|
| leg | run | host | result |
|---|---|---|---|
| prefill H2H, this PR | 45673992469 | X2-LA03-S01-D07 | Spark 1,287 / 1,143 tok/s (7.7K / 31K); decode 42.7, C8 82.3; Strict prefill 1,281 / 1,140 |
prefill H2H, main bc0c3a34b |
45679041312 | X2-LA03-S01-D01 | Spark 1,101 / 838; decode 42.8, C8 85.8 |
| ST-995 Spark | 45673951150 | — | 79.30 / 79.26, 0 faults (main #412-only: 79.10 / 79.63) |
| agentic ×10 Spark | 45673975018 | X2-LA03-S03-D08 | 10/10, 6.72 s/turn, 0 faults |
- Prefill vs main: +16.9% at 7.7K tokens and +36.4% at 31K, with decode unchanged. The kernel no longer spills under hipcc 7.16; main's 75e3941 spilled 117 VGPR slots on the runners.
- Numerics (framework): pd 96/96 ×6, NLL code 0.63684 / text 0.89670, and the 150-request bfcl replay 150/150 with 0 faults.
- gb10: the change is AMD-branch only, and the PTX is unchanged.
This was referenced Nov 27, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
inkling2 on AMD: flash prefill without register spills under hipcc 7.16
hipcc 7.16 (runner toolchain, ROCm 7.16.26385) compiles the merged
flash kernel to 256 VGPRs + 117-128 VGPR spill slots; hipcc 7.13
(framework) gives 234 VGPRs / 0 spills. With this change: fused
softmax row staging (no tm/pv temporaries) + V staged as fp16 in LDS
(numerics bit-identical to the old per-head kernel's V path).
ISA after fix: 7.13 = 234 VGPR / 0 spills / 44KB LDS; 7.16 = 256 VGPR
/ 16 spill slots (residual spills in shfl_xor reduce blocks only).
Bit-identical output in the standalone CPU-reference harness
(q_len 1..4096, q_offset chunked, windows 0/16/64/1024).
Runner prefill (Ryzen AI MAX+ 395, gfx1151, hipcc 7.16):
main ~1,192/954 tok/s -> 1,327/1,174 tok/s (+11%/+23%).
Framework prefill: 1,362 -> 1,525 @7.7K, 1,109 -> 1,383 @31k.
Follows #413 (merged in train #421 as 75e3941), whose AMD flash prefill spills on the DevLab runners toolchain. AMD-only (#if SCALE / HIP_PLATFORM_AMD branch); gb10 PTX untouched. Runner gates (ST-995, agentic x10, H2H vs main bc0c3a3) in flight; results will be posted here before merge.
Generated with Devin