moe(w4a16): preserve preplanned tile geometry across launch op#1
Open
voipmonitor wants to merge 1 commit into
Open
Conversation
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.
Problem
compile_w4a16_fused_moe(..., force_tile_config=...)correctly builds a pinned launch, butrun_w4a16_moecrosses thetorch.librarycustom-op boundary and_w4a16_fused_moe_launch_flatrecompiles without the selected tile geometry. The lookup therefore silently resolves auto tiles. NF3 packs are tile-N specific, so the GLM-5.2 TP4 hybrid path packed FC1 for tile-N 256 while the custom op ran the auto tile-N 128 kernel, producing garbled output.The production-shape reproducer measured relative error 1.29 with the pinned
(64,256,64,256)launch before this fix. Small auto-tile tests did not expose it.Fix
Thread the four selected FC1/FC2 tile dimensions through both normal and calibrated launch custom ops, then re-pin those exact values at the internal compile/cache lookup. This preserves the preplanned launch contract without disabling direct-topk TC decode or duplicating weights.
Validation
-1cross-tier routes.test_w4a16_moe_launch_ops_have_fake_dispatchpasses with the extended schemas.madeby561/GLM-5.2-MXFP8-NVFP4-NF3-HybridTP4 E2E with the native vLLM loader: short and 30k-context generation are coherent; the same image without this patch is garbled from token 1.