Skip to content

train 1124155850: #3733 #4728 (CI only) - #4916

Closed
ashhart wants to merge 20 commits into
mainfrom
lead/train-1124155850
Closed

ashhart wants to merge 20 commits into
mainfrom
lead/train-1124155850

Conversation

@ashhart

@ashhart ashhart commented Nov 24, 2026

Copy link
Copy Markdown
Owner

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

plotarmordev and others added 20 commits November 24, 2026 15:58
…eir selftests and timings

The net change of #3733 at 5855d56 over its merge base 6d0a128, as one commit: the branch's merge commits hold changes of their own.
… decoder on core/root.zig

Main's Metal image tools, recipe, h3_image_prompt.zig and tests win every add/add conflict.
The separate h3_core module is gone: every H3 tool takes core/root.zig, which owns picture,
picture_writer's resample and qwen_vl.rope; checkpoint_fixture comes from core too.
The decoder's weights/read/synthetic helpers live once in image_decoder.zig, shared by
Metal, CPU and CUDA. Unused qwen_copy.zig, h3_image_metal.zig and Tensors.span dropped.
The full GB10 contract never finishes on TOP: moss's tf_md_conv3x3 float64 shapes reference runs past 75 min.
kernel-contract -tf_md_conv3x3 runs every other kernel's gates and controls, the back and after suites and every
limit record.
…ws, the NVFP4 factor once an expert

tf_ink2moe_up and tf_ink2moe_prompt_up decoded every BF16 weight with its own byte loads (code, scale)
and an FP32 division (amax / denominator), so a decode token spent 96 ms in the routed experts. Each warp
now stages its 32 rows' codes 128 bytes a row (8 lanes a row) and their scale bytes in shared memory, and
decodes its fragments from there; the expert's factor is computed once a unit. On decode (one row) the next
tile and the next step's inputs are fetched while the current step multiplies. Each weight is the same
product, rounded alike, and the mma sequence is unchanged, so the bits are unchanged.
…e, K = 32 in the contract

fetch read each lane's row scales as whole uint32 words, (2 steps + 3) / 4 of them for NVFP4 and one for
MXFP8. The scales are unpadded, so a tile with fewer than four bytes left read past the row, and at the
end of the projection past the data; at K = 32 a row's scales also start at an odd half-word, which a word
load cannot read. Whole words now load only while four bytes remain and the row's start is word-aligned;
the rest loads byte by byte into the same word. Mini's shapes (K 2304 and 1152) are aligned with no tail,
so their path still takes whole words.

The contract adds NVFP4 and MXFP8 decode cases at K = 32 (rows 1 and 16), each projection's scales in an
allocation of exactly their size, so compute-sanitizer memcheck sees any byte read past them.
#4728 rewrites tf_ink2moe_up and tf_ink2moe_prompt_up and records their
compiled usage at sm_121 only; at sm_80, sm_86, sm_89 and sm_120 the rows
held zeros, so the kernel registry test failed with 8 "no compiled usage
recorded" entries.

The values are nvcc 13.0's, from kernel-contract-limits over fatbins built
for all five SMs from this tree; each sm_121 entry equals the one the PR
recorded. No kernel changes.
@ashhart

ashhart commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

Landed: #3733 #4728 as main 0d8cbb2. This PR only carried their CI.

@ashhart ashhart closed this Nov 24, 2026
@ashhart
ashhart deleted the lead/train-1124155850 branch November 24, 2026 18:06
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.

3 participants