[PR #113] [MERGED] HIP: wave32 WMMA prompt attention (wmma2) by default on Strix Halo (gfx1151), +4% prompt speed #347

Closed
opened 2026-10-29 21:24:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/mw00/project-maya/pull/113
Author: @boxwrench
Created: 10/11/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @mw00

Base: main ← Head: hip/gfx1151-wmma2-default


📝 Commits (1)

  • 94e3bc8 HIP: wave32 WMMA prompt attention (wmma2) by default on Strix Halo (gfx1151)

📊 Changes

4 files changed (+12 additions, -10 deletions)

View changed files

📝 docs/SETTINGS.md (+1 -1)
📝 include/strata/kernels/glm_batch.hpp (+1 -1)
📝 src/core/glm_prefill.cu (+2 -2)
📝 src/kernels/cuda/glm_batch.cu (+8 -6)

📄 Description

The gfx11 path of mla_attn_wmma2 (from #38) already builds and runs on gfx1151, but Strix Halo stayed on f16q. This makes wmma2 the default on gfx1151 only; the other gfx11 parts keep f16q, since I haven't measured them. STRATA_GLM_PREFILL_ATTN=f16q gives the old path back.

No new code is compiled: the kernel and its gfx11 branch are unchanged, so a Windows HIP SDK build is affected only by which path runs, not by whether it compiles. The change is the arch tag in mla_wmma2_arch() / mla_wmma2_default(), plus the comment and README row.

Measured on gfx1151 (Radeon 8060S, 128 GB, TheRock ROCm 10.2, Maya-S, 256K context)

check wmma2 f16q
hip_glm_prefill_attention, rel L2 vs F32 (FP16 / INT8 latents) 3.42e-7 / 3.35e-7 9.78e-5 / 9.99e-5
kernel alone, 8K prompt 269.5 ms 365.3 ms (1.36x)
kernel alone, 32K prompt 1191.7 ms 1681.5 ms (1.41x)

Prompt speed end to end, the same binary with STRATA_GLM_PREFILL_ATTN switched, a fresh server per run, 2 runs each:

prompt wmma2 f16q
~8K 346.6 tok/s 334.3 +3.7%
~32K 339.5 327.1 +3.8%
~64K 333.5 319.9 +4.3%

Decode is flat (prompt-only path). glm_layer_parity --selftest and glm_model_test --selftest pass. Greedy answers differ from f16q after a few hundred characters: both paths are deterministic, and wmma2 is the one nearer F32, as on gfx12.

Measured on a branch with #98 and #96 underneath; this PR is on current main and touches neither. I haven't built it with the Windows HIP SDK.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/mw00/project-maya/pull/113 **Author:** [@boxwrench](https://github.com/boxwrench) **Created:** 10/11/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@mw00](https://github.com/mw00) **Base:** `main` ← **Head:** `hip/gfx1151-wmma2-default` --- ### 📝 Commits (1) - [`94e3bc8`](https://github.com/mw00/project-maya/commit/94e3bc8604c490aff948a8dae622dce8b8d3db75) HIP: wave32 WMMA prompt attention (wmma2) by default on Strix Halo (gfx1151) ### 📊 Changes **4 files changed** (+12 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `docs/SETTINGS.md` (+1 -1) 📝 `include/strata/kernels/glm_batch.hpp` (+1 -1) 📝 `src/core/glm_prefill.cu` (+2 -2) 📝 `src/kernels/cuda/glm_batch.cu` (+8 -6) </details> ### 📄 Description The gfx11 path of `mla_attn_wmma2` (from #38) already builds and runs on gfx1151, but Strix Halo stayed on `f16q`. This makes `wmma2` the default on gfx1151 only; the other gfx11 parts keep `f16q`, since I haven't measured them. `STRATA_GLM_PREFILL_ATTN=f16q` gives the old path back. No new code is compiled: the kernel and its gfx11 branch are unchanged, so a Windows HIP SDK build is affected only by which path runs, not by whether it compiles. The change is the arch tag in `mla_wmma2_arch()` / `mla_wmma2_default()`, plus the comment and README row. ## Measured on gfx1151 (Radeon 8060S, 128 GB, TheRock ROCm 10.2, Maya-S, 256K context) | check | wmma2 | f16q | |---|---:|---:| | `hip_glm_prefill_attention`, rel L2 vs F32 (FP16 / INT8 latents) | 3.42e-7 / 3.35e-7 | 9.78e-5 / 9.99e-5 | | kernel alone, 8K prompt | 269.5 ms | 365.3 ms (**1.36x**) | | kernel alone, 32K prompt | 1191.7 ms | 1681.5 ms (**1.41x**) | Prompt speed end to end, the same binary with `STRATA_GLM_PREFILL_ATTN` switched, a fresh server per run, 2 runs each: | prompt | wmma2 | f16q | | |---|---:|---:|---:| | ~8K | 346.6 tok/s | 334.3 | **+3.7%** | | ~32K | 339.5 | 327.1 | **+3.8%** | | ~64K | 333.5 | 319.9 | **+4.3%** | Decode is flat (prompt-only path). `glm_layer_parity --selftest` and `glm_model_test --selftest` pass. Greedy answers differ from `f16q` after a few hundred characters: both paths are deterministic, and wmma2 is the one nearer F32, as on gfx12. Measured on a branch with #98 and #96 underneath; this PR is on current main and touches neither. I haven't built it with the Windows HIP SDK. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 21:24:29 +07:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#347
No description provided.