Skip to content

Change set 13: chunked gated-delta-net on CDNA (+12% prefill) - #28

Merged
davetha merged 1 commit into
mainfrom
gdn-chunked-cdna
Aug 10, 2026
Merged

Change set 13: chunked gated-delta-net on CDNA (+12% prefill)#28
davetha merged 1 commit into
mainfrom
gdn-chunked-cdna

Conversation

@davetha

@davetha davetha commented Aug 10, 2026

Copy link
Copy Markdown
Owner

Makes upstream PR #26001's chunked GDN kernel work on gfx90a. Four defects, the load-bearing one being the accumulator fragment layout (DATA_LAYOUT_J_MAJOR on CDNA, not I_MAJOR) which transposed every writeback.

Measured on 2x MI210, Qwen3.6-40B IQ4_NL, same binary toggled by GGML_CUDA_DISABLE_GDN_CHUNK:

test off on gain
pp2048 606.48 677.99 +11.8%
pp8192 910.75 1021.18 +12.1%

test-backend-ops -o GATED_DELTA_NET 50/51 on both devices (from 36/51); temp-0 output byte-identical to the recurrent path. The one failure is a precision margin at n_seq_tokens=2048 (NMSE ~3e-7 vs 2e-7), disclosed rather than papered over.

Patch 13 targets an unmerged upstream PR, so it is excluded from the Dockerfile and documented separately under How to apply — which this also refreshes, since it still said 'change sets 4-10'.

Four defects kept upstream PR #26001's ggml_cuda_mma path from working on
gfx90a: a 32-thread block against 64-lane MFMA tiles, __launch_bounds__(32)
blocking the wider launch, plain load_ldmatrix having no AMD_MFMA branch, and
-- the real one -- the 16x16 f32 accumulator declared I_MAJOR when CDNA needs
J_MAJOR, which transposed every writeback.

Measured on 2x MI210, Qwen3.6-40B IQ4_NL: pp2048 606->678 (+11.8%), pp8192
911->1021 (+12.1%). test-backend-ops 50/51 on both devices; temp-0 output
byte-identical to the recurrent path.

Patch 13 applies to PR #26001, not the pinned base, so it is deliberately
excluded from the Dockerfile and documented separately in How to apply.
Also refreshes that section, which still said 'change sets 4-10'.
@davetha
davetha merged commit 14eed46 into main Aug 10, 2026
@davetha
davetha deleted the gdn-chunked-cdna branch August 10, 2026 17:13
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