Repository navigation
CUDA EXL3 grouped experts: launch and size storage at the caller's tile and pair count - #2843
Merged
Merged
Conversation
Owner
Author
|
Device result on a GB10 (sm_121):
|
ashhart
added a commit
that referenced
this pull request
Nov 12, 2026
ashhart
force-pushed
the
lead/exl3-grouped-tile
branch
from
November 12, 2026 02:14
b425b15 to
0f969e9
Compare
This was referenced Nov 12, 2026
…air count (#2823) Grouped.run and bytes take the real pair count and the caller's tile (16 or 64; any other tile is refused with TileNotBuilt). maxm is the tile, grid.z is mats * sk * (tile / 16), and x0, x1 and z are spaced by pairs instead of items * 64. Every caller passes its own tile: decode and verify 16, wide prompts 64, MiniMax-M3's prefill 64. Qwen sizes its grouped storage once at max_rows * slots. No kernel source changes.
ashhart
force-pushed
the
lead/exl3-grouped-tile
branch
from
November 12, 2026 13:33
0f969e9 to
4c61cbe
Compare
ashhart
added a commit
that referenced
this pull request
Nov 12, 2026
6 of 9 tasks
This was referenced Nov 12, 2026
ashhart
added a commit
that referenced
this pull request
Nov 12, 2026
test-gradient-serving (the serving kernels' and launch wrappers' source hashes) and test-qwen-serving-host (the dense serving launch sequence) ran only in the macOS nightly. A PR that changed a pinned file therefore landed green and turned the next nightly red: 10, 11 and 12 Nov, and again now, because #2843 (3768bc0) changed zig/src/cuda/experts.zig. - no-gpu.yml runs both steps on every PR, after the goldens, so a change to a pinned file needs its re-pin in the same PR. - gradient-serving.tsv re-pins experts.zig with #2843 named beside it: the grouped EXL3 experts are launched and sized at the caller's tile and pair count; no kernel source changed. test-gradient-serving: 1/1 pass.
ashhart
added a commit
that referenced
this pull request
Nov 12, 2026
test-gradient-serving (the serving kernels' and launch wrappers' source hashes) and test-qwen-serving-host (the dense serving launch sequence) ran only in the macOS nightly. A PR that changed a pinned file therefore landed green and turned the next nightly red: 10, 11 and 12 Nov, and again now, because #2843 (3768bc0) changed zig/src/cuda/experts.zig. - no-gpu.yml runs both steps on every PR, after the goldens, so a change to a pinned file needs its re-pin in the same PR. - gradient-serving.tsv re-pins experts.zig with #2843 named beside it: the grouped EXL3 experts are launched and sized at the caller's tile and pair count; no kernel source changed. test-gradient-serving: 1/1 pass.
ashhart
added a commit
to BobClawblaw/TensorFold
that referenced
this pull request
Nov 13, 2026
ashhart#1630 adds the bf16 experts format to Grouped (experts.zig) and registers the experts_bf16 image (kernels.zig); no existing kernel source changed. Both rows are recomputed on main after ashhart#3011, which re-pinned experts.zig for ashhart#2843.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 13, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to BobClawblaw/TensorFold
that referenced
this pull request
Nov 13, 2026
ashhart#1630 adds the bf16 experts format to Grouped (experts.zig) and registers the experts_bf16 image (kernels.zig); no existing kernel source changed. Both rows are recomputed on main after ashhart#3011, which re-pinned experts.zig for ashhart#2843.
ashhart
added a commit
that referenced
this pull request
Nov 13, 2026
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 19, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 19, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 19, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 21, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 21, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 21, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 21, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 23, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
ashhart
added a commit
to ajensenwaud/TensorFold
that referenced
this pull request
Nov 26, 2026
…#2843 asks Main's ashhart#2843 (3768bc0) gave Grouped.decode, Grouped.prompt and exl3_grouped.Grouped.run the real pair count and the caller's tile, and sizes the EXL3 storage by pairs. Ling's block_ffn passes rows * slots and its own tile (16 for decode, promptTile for a prompt pass), as every other family does. The device checks pass the tile their plans were routed at (16, or ling_clamp's prompt tile); ling_exl3_clamp drops the old ignored bool.
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.
On CUDA, the shared EXL3 grouped-expert path launched its decode grid at 64 rows a member and sized its pair storage for 64 pairs an item, although decode and verify callers route at a 16-row tile. Three quarters of the decode grid's workgroups exited at once, and storage was sized for four times the pairs a step can make.
What changes:
Grouped.runandbytestake the real pair count and the caller's tile (16 or 64; any other tile is refused withTileNotBuilt):maxmis the tile,grid.zismats * sk * (tile / 16), andx0,x1andzare spaced by pairs instead ofitems * 64.experts.Grouped.decodeandpromptpass both through; other formats ignore them.decode(), so a smaller tile there would drop members). Qwen sizes its grouped storage once atmax_rows * slots: on Qwen3.6-35B-A3B that is 36,864 pair rows where it was 163,904, about 3 GB less.Exactness: the split count depends on the shape only; each (pair, split, matrix) partial comes from the same warps over the same K range, and the finish adds splits in order; the pair stride is addressing only.
Checks: host tests that
bytesfor 144 pairs is exactly 144 times one pair at both tiles, that tiles 0, 8, 15, 17, 32, 48 and 128 are refused, and a recording driver that checks the grid, the stage, the kernel's pairs and maxm, the offsets, and that tile 64 covers all 64 members. A device test,exl3-grouped-tile, compares up and down outputs byte for byte between tile 16 and the old 64 at 1, 4 and 16 decode rows, with a tile-64 plan throughdecode()and a planted mutant that must fail.test-exl3,test-minimax-cuda-host, the Qwen EXL3 host steps,compile-cuda-tests -Dtarget=aarch64-linux-gnu,zig fmt --checkand the lean count pass.Still to run before landing:
tf-cuda-test exl3-grouped-tileon a GB10, and a served check on an EXL3 MoE checkpoint (Qwen3.6-35B-A3B EXL3: decode at 1 and 4 streams with and without MTP, prompt at 2K and 8K, start-up memory; MiniMax-M3.1 EXL3 at TP=2, one stream) with replies equal.For #2823.