Skip to content

strix-hip DFlash2 selector: exact round top-K (register lists spilled on gfx1151) — 27B DFlash2 +17% - #329

Merged
AzeezIsh merged 1 commit into
mainfrom
perf/hip-dflash2-selector-round
Nov 5, 2026
Merged

AzeezIsh merged 1 commit into
mainfrom
perf/hip-dflash2-selector-round

Conversation

@AzeezIsh

@AzeezIsh AzeezIsh commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

On gfx1151 the DFlash2 candidate selector's phase 1 kept a sorted per-thread top-K list in registers and spilled: 801 VGPRs / 1416 B scratch per thread at K=16 (512 threads), 2897 / 3680 B at K=32 (1024 threads) — read from the code object notes (llvm-readelf --notes).

Phase 1 now runs K block-wide argmax rounds; each round considers only each thread's own elements strictly after the previous winner in the same total order (df2_sel_before). Same exact top-K in the same order, no per-thread arrays. strix-hip only (DF2_SEL_ROUND_TOPK, default on); gb10 untouched.

Exact-train A/B — framework (gfx1151), job f241, Qwen3.8-27B NVFP4 + incoai/Qwen3.8-27B-DFlash2 (top_k 16), main a523a07 (A) vs this branch b75da4a (B), two runs each:

prompt A tok/s B tok/s Δ
fib (200 tok) 40.2 / 40.0 47.1 / 47.2 +17.6%
sky (98 tok) 21.0 / 21.0 24.7 / 24.8 +17.9%
essay (200 tok) 13.5 / 13.5 16.0 / 16.0 +18.5%
capital (8 tok) 14.2 / 14.8 15.5 / 15.5 +7%
  • Greedy outputs identical A vs B on 4/4 prompts; tok_step identical (8.0 / 7.41 / 3.92 / 2.43).
  • DevLab runner native strix-hip build: success (41995506753).
  • strix is offline (~15 h); the framework A/B is the gfx1151 platform gate.

Found while porting Ripple-65B's DFlash2 drafter (top_k 32): there the K=32 selector cost 257 ms per call (rocprofv3), 21% of DFlash GPU time.

🤖 Generated with Claude Code

…er lists spill on gfx1151)

On gfx1151 the per-thread sorted register lists of phase 1 spill: 801 VGPRs /
1416 B scratch per thread at K=16, 512 threads (2897 / 3680 B at K=32).
Phase 1 now runs K block-wide argmax rounds, each over every thread's own
elements strictly after the previous winner in the same total order — the
same exact top-K, no per-thread arrays. gb10 is untouched.

framework f240, Qwen3.8-27B NVFP4 + incoai DFlash2 (top_k 16), x2 runs:
greedy identical on 4/4 prompts, identical tok_step; tok/s fib 40.2 -> 47.2
(+17.6%), sky 21.0 -> 24.6 (+17%), essay 13.6 -> 16.0 (+18%), capital
14.1 -> 15.5.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@AzeezIsh
AzeezIsh merged commit 999bfc4 into main Nov 5, 2026
15 of 20 checks passed
AzeezIsh added a commit that referenced this pull request Nov 10, 2026
…he strix-hip selector blob

kernel_shadow_detector: #328's common/rope.cu rope_forward_rows is the
rotate_half convention Mistral's interleaved shadow deliberately lacks;
ops::rope looks it up with kernel_or_null and falls back to rope_forward.

dflash2_selector_abi: b75da4a (#329, exact round top-K, qualified by the
Qwen3.8-27B ST-995 gate) changed the pinned strix-hip selector without updating
the hash, so main fails this test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
AzeezIsh added a commit that referenced this pull request Nov 10, 2026
…p three private intra-doc links

ci: re-pin the HIP DFlash2 selector to the #329 blob; drop three private intra-doc links
maplepaladin73 pushed a commit to maplepaladin73/atlas that referenced this pull request Nov 11, 2026
…hree private intra-doc links

main's own dflash2_selector_abi test has failed since Atlas-Inf#329 changed the
qualified strix-hip selector (exact round top-K) without moving the pin, which
turns cargo test and llvm-cov red on every PR. The rustdoc job fails on three
intra-doc links to private items added in Atlas-Inf#333.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant