mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #457] [CLOSED] GLM decode attention: take-two kernels for the indexer's scores and MLA's split attention (opt-in, bit for bit), glm_attn_bench #536
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#536
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/mw00/project-maya/pull/457
Author: @pepuscz
Created: 10/24/2026
Status: ❌ Closed
Base:
main← Head:pr/glm-attn-take-two-v1126📝 Commits (10+)
a5350cfGLM experts: IQ2_S gate/up on the tuned RDNA kernel, opt-in (MAYA_GLM_GU22_TUNED=1)e6cd86eGLM experts: the engine logs which kernel IQ2_S gate/up ran, once per GPU and call path (Codex's review)0507d3bGLM experts: the engine logs which dense GEMV kernels each GPU's decode runs, once per GPUc6db566GLM fast path: the stage profiler splits the indexer's score from its top-k select and MLA into its three stepse20d99bGLM decode attention: take-two kernels for the indexer's scores and MLA's split attention (opt-in, bit for bit), glm_attn_bench86ae92fglm_attn_bench: time every call against a working set past the 96 MB Infinity Cache, the rotation never restartingf0772d1glm_attn_bench: the reduction row fails on a non-finite sum or max too, and prints the count (Codex's review)4934849GLM decode attention: the indexer label takes only the block counts the bench sweeps (2, 4, 8, 16) - every accepted label is a tested one (Codex)42921ceglm_attn_bench: MLA's timed cell sets are disjoint (one shuffled permutation of the pool's rows), the bytes a round reads printed (Codex)2e21847glm_attn_bench: stdout line-buffered, so the engine's stderr records never land inside a row (C11 0400Z, raw line 354)📊 Changes
8 files changed (+904 additions, -22 deletions)
View changed files
📝
CMakeLists.txt(+5 -0)📝
docs/SETTINGS.md(+4 -1)📝
include/strata/kernels/glm_expert_bench.hpp(+9 -0)📝
include/strata/kernels/glm_fast.hpp(+13 -2)📝
src/core/glm_fast_path.cu(+9 -5)📝
src/core/glm_rows.cu(+2 -2)📝
src/kernels/cuda/glm_fast.cu(+477 -12)➕
tests/hip/glm_attn_bench.cu(+385 -0)📄 Description
Builds on #455 and #456 (their commits are the first four here); review those first.
What. Two opt-in decode kernels, each selected by a label, each doing the original kernel's arithmetic in the same
order:
MAYA_GLM_DSA_SCORE2=<label>: the indexer's scores over the visible pools (32 heads x 128),[r|s][l|x][1|2]b [2|4|8|16]- the query in registers or LDS, the warp reduction across lanes (RDNA3 DPP) or by shuffles, one or twopools a warp, 2-16 blocks a multiprocessor.
MAYA_GLM_MLA_ATTN2=<label>: MLA's split attention over the selected latents,h<16|32|64>[l|x][v|e][c|o].Only the decode's token path (and a decode row of several conversations) takes them; a prompt's windows keep the
original kernels. The variables are new names on purpose:
STRATA_GLM_DSA_SCOREis already the prompt's numeric switchin
glm_batch.cu. The engine logs which kernels each GPU ran.tests/hip/glm_attn_bench.cutimes every label againstthe original on a working set past the 96 MB Infinity Cache and checks each one bit for bit.
Changes.
src/kernels/cuda/glm_fast.cu,src/core/glm_fast_path.cu,src/core/glm_rows.cu,include/strata/kernels/glm_fast.hpp,glm_expert_bench.hpp,tests/hip/glm_attn_bench.cu,CMakeLists.txt,docs/SETTINGS.md.Verified (Maya-M; RX 7900 XTX gfx1100):
rl1b8250.2 -> 57.7 µs (4.34x),h32lvc201.7 -> 143.9 µs(1.40x).
rl1b8+h32lvcagainst 52.4 / 52.4 without (+6.2 %); prefill unchanged (927.4 vs 927.1); all five values, the same answer.byte-identical with and without the labels.
pr/glm-union-v112630f93cf): the same two logits pairs, originalagainst take-two, are byte-identical again (32 rows each), with all 365 intermediate dumps of the long pair identical,
and the same hashes as on v1.1.25.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.