Skip to content

train 1119031709: #3373 #3160 #2044 (CI only) - #3912

Closed
ashhart wants to merge 12 commits into
mainfrom
lead/train-1119031709
Closed

ashhart wants to merge 12 commits into
mainfrom
lead/train-1119031709

Conversation

@ashhart

@ashhart ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #3373 #3160 #2044 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

Nipale-ai and others added 12 commits November 19, 2026 05:50
…ch and the filled-item prompt grid, all failed (#1603)

Squashed from the PR's three commits (the middle one a merge of main) onto today's main, so it replays one commit at a time.
A decode window's routed experts run on the same item plan the prompt path and
the NVFP4/FP8 MoE path already use, instead of tf_exl3_group plus the maxu x
member-tile grid: the 9-slot picks are grouped by the Router into items of at
most 16 pairs and the grouped GEMVs launch in standard mode on grids
maxItems x (n/128) x (mats*sk), so at 64 rows ~325 blocks do work instead of
~55k and the one-block O(experts x pairs) group scan becomes the ranked plan.
No 9->8 compaction and no copy back: the down epilogue writes ey's routed slot
rows in place through tf_exl3_down_combine.

The grouped kernel and tf_exl3_down_combine already take item triples in
standard mode and a caller-chosen slot-row base, so no kernel change is needed:
the plan reaches the decode as the same Items the prompt path takes, with the
family's Router and the plan buffer the block already holds.

Bit-exact: the glm-exl3-items GPU check compares the item plan's ey against the
plain grouped decode byte for byte over distinct and lockstep (16/32/48/64-row)
windows, and calls the plain launch shape directly so both paths stay covered.
A wrong plan (a members offset off by one, a bad item first/count, the shared
item not skipped) routes a slot to the wrong expert, so ey's bytes differ.

A plan is refused (error.TileNotBuilt) for a non-mcg codebook, a non-zero wts
or out, a zero ey, or a null plan array: the item kernels read one codebook a
launch and write the caller's slot rows.

Files:
- zig/src/cuda/exl3_experts.zig: Items, runWith on the plan (standard mode), and
  fusedBytes/fusedScratch for the 9-slot layout without y.
- zig/src/families/glm/cuda_exl3.zig: the decode branch on decodeItems, and
  scratchBytes sizing a decode arena with decodeBytes, the larger of the plain
  8-slot layout and the 9-slot one, so no pool changes at GLM's shapes.
- zig/tests/cuda/glm_exl3_items_tests.zig: the items decode against the plain
  launch, case by case.
Dims 512 alone only asked the item plan about small matrices. The check now also runs
dims 4096 at the two widths a rank meets, 768 and 1024, one distinct window and one
lockstep window each, with dims threaded through the weights, layer and pack helpers.

Each shape carries an explicit case list, so 17 rows stays distinct: it is the only
distinct window that spans two 16-pair items. The RESULT line counts the NaN tallies
beside the byte comparisons, so this set prints 66 checks: 18 base cases and 4 served
cases at three checks each.
# Conflicts:
#	CHANGELOG.md
main.zig is at its 600-line limit, so a second command can only ride on the
lines glm-exl3 already has. Its dispatch now names both commands once and
calls glm_exl3_tests.runCmd, which picks the expert check or the item-plan
check by name, and the usage block names both commands on one line. The file
contributes no new lines to a merge, and each command runs the check it did.
…kes; CHANGELOG credit (#2044)

main's glm.experts.Kernels.load now takes ?cuda.experts32.Values as its last argument; null is the
no-block-32 choice the old false made, as glm_exl3_tests.zig passes. The CHANGELOG bullet credits
@BadAd84 and says the TP=3 decode numbers are the author's own run against main 673a34b.
@ashhart
ashhart force-pushed the lead/train-1119031709 branch from 92b81dc to ce6f3c8 Compare November 19, 2026 05:50
@ashhart

ashhart commented Nov 19, 2026

Copy link
Copy Markdown
Owner Author

Stopped at #2044.

@ashhart ashhart closed this Nov 19, 2026
@ashhart
ashhart deleted the lead/train-1119031709 branch November 19, 2026 08:04
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.

4 participants