Repository navigation
Conversation
Keep the device support fallback aligned with release_sms so the No GPU test-device checks see the same CUDA target set.
Routed experts over EXL3 trellises now run on Metal: main's route plan, tf_exl3_rotate_in per (token, expert) pair, new slot kernels for gate/up and down (tf_dsv41_x3_up, tf_dsv41_x3_down) in which a lane owns a column and adds each pair's products in tf_exl3_matmul_row's order, an epilogue (tf_dsv41_x3_act) that rotates gate and up out to bf16 and applies the MXFP4 lane's clamped SwiGLU and route weight, tf_exl3_rotate_out into the MXFP4 lane's per-pair layout, and main's combine. Experts may differ in width and codebook. A new serial reference (experts_exl3_ref.zig) composes the one-row reference's dot per pair with flush-to-zero fp32 rotations, main's clamped SwiGLU and main's combine; the kernel contract holds every slot sum, act, expert output and combined row bit-equal to it at 1 to 16 rows and at V4.1's sizes, each pair's sums equal to tf_exl3_matmul_row run on that pair alone, with two planted controls (the TwoSum error term dropped, the route weight dropped).
…through contract.register check returns error.ShortExpertTable when a table holds fewer descriptors than the call's experts, before any launch, so no pair leaves a row the combine reads unwritten. test-dsv41-exl3-contract poisons the outputs and holds them untouched on refusal and fully written with the full table, and fails each allocation of the suite's create in turn.
The up registration with TwoSum's error term dropped goes red at shapes (a slot sum differs at 1 x 256 x 1024), so every new kernel has a negative control.
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: #5053 #5063 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.