Repository navigation
Conversation
… 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.
…prompt kernel (19)
…ean, stale limits are main's)
…tract's state on TOP
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.
…opped at 45 min in window_rows)
…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.
Owner
Author
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.
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.