Skip to content

train 1120042711: #3521 (CI only) - #4152

Closed
ashhart wants to merge 4 commits into
mainfrom
lead/train-1120042711
Closed

ashhart wants to merge 4 commits into
mainfrom
lead/train-1120042711

Conversation

@ashhart

@ashhart ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #3521 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.

AbrahamCete and others added 4 commits November 20, 2026 04:27
…below the GEMM tile

Below 64 rows a routed prompt plan cut every expert into items of 8
pairs, the shared expert too. The shared expert holds every row
whatever the routing, so a prompt of N rows ran it as ceil(N / 8)
items, each reading its weights again.

`tf_moe_route` now takes the shared expert's id and a tile of its own.
In a prompt pass (`Ops.prefill`, outside a lane round) the stacked
shared expert is cut at the GEMM tile, 128 rows, so below 128 rows it
is one item; the routed experts keep `tile_for`'s rule. Decode, lane
rounds and the MTP draft head keep the 8-row tile for every expert,
and tp ranks and Nemotron, which do not stack it, pass none.

The routed launches' m stays the most rows an item holds
(`itemRowsFor`): the K-parallel tiers that do not loop cover only m
rows of an item and fit by it. The registry ignores m when it prices
a routed prompt plan, so the kernel chosen does not change. The served
fixture and `routedShape` plan as serving does.

The route tests move to kernel_tests/route.zig.
… from 33 rows

A routed prompt plan cut its routed experts into 8-pair items below 64
rows on every card. On gfx1151 the 35B-A3B's plan of 33 or more rows
already runs on the 64-row routed tile, which takes an item of up to 64
rows in one block, so the 8-pair items only split each busy expert's
rows into more items.

gfx1151's tuning table now sets `prompt_block_from = 33`: the fewest
rows a prompt pass's routed plan cuts at the 128-row GEMM tile. It
serves only the chip the table is named after (`promptBlockFrom`), so
gfx1150, gfx1152 and gfx1153, which share the table's costs, and the
other cards keep 64. `tile_for` reads it for prompt passes only
(`Ops.prefill`): decode, lane rounds and the MTP draft head keep the
8-row tile below 64 rows. The launches' m stays the most rows an item
holds (`itemRowsFor`), and the fixtures plan with the card's start.

The bytes hold: a prompt tile writes the same bits however a prompt's
rows are cut into items, which the served fixture checks entry by
entry, and the routed launches still cover every row of every item.
tf_moe_route joins the contract as the engine launches it: a prompt pass
with the GEMM tile from 33 and from 64 rows, a prompt pass with no stacked
shared expert, decode with the MTP draft head, and a lane round. Gates 1
and 3 check every member and item exactly against the contract's own
statement of the cut, gate 2 repeats it behind guard bytes, and gate 4 has
no sums to check. Two planted controls go red at gate 3: the stacked shared
expert cut at the routed 8-row tile, and a prompt planned from 64 rows
where the GEMM tile starts at 33. Its launch record holds ROCm 10.1's usage
on every served chip.
@ashhart ashhart closed this Nov 20, 2026
@ashhart ashhart reopened this Nov 20, 2026
@ashhart

ashhart commented Nov 20, 2026

Copy link
Copy Markdown
Owner Author

CI red on this tip (zig); the PRs land the usual way.

@ashhart ashhart closed this Nov 20, 2026
@ashhart
ashhart deleted the lead/train-1120042711 branch November 20, 2026 05:51
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.

2 participants