Repository navigation
fix(flydsl-aot): map Situv2 activation in MoE AOT parse_csv - #4429
Merged
Merged
Conversation
The FlyDSL MoE AOT precompiler collapsed every non-Swiglu activation to "silu" when building compile jobs. ActivationType.Situv2 (used by the new kimik3_a8w4_tuned_fmoe.csv) therefore compiled its stage1 kernel under an act="silu" cache key, while runtime (fused_moe._flydsl_stage1_wrapper) looks it up under act="situv2". Under FLYDSL_RUNTIME_RUN_ONLY=1 that mismatch surfaces as "no usable AOT cache for launch_mixed_moe_gemm1", failing test_moe_2stage. Mirror the runtime three-way mapping (and the existing grouped_moe AOT parser): Swiglu -> "swiglu", Situv2 -> "situv2", else "silu". Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
valarLip
approved these changes
Jul 29, 2026
zufayu
added a commit
that referenced
this pull request
Sep 7, 2026
FlyDSL needs patching after merge 1.66x as often as the repo average: 20 of the 98 fix-commits that reference another PR touch it, against a 12.3% share of all commits (194/1577), one-sided binomial p=0.015, measured on aiter main 636098e. Its revert rate is NOT elevated -- 5 of 40, against that same 12.3% -- but n=40 has no power in either direction, so that is "cannot tell", not "no". The patching is where the signal is, and post-merge patching is what review is for. Of its 21 precise fixes, 9 fall into two mechanisms and neither had a rule. B8 -- a buffer or descriptor bound not tied to the tensor's real extent. de9f1f8 bound arg_scale_a with max_size=True while scale_a is per-row(M) and M is ragged; the comment it also corrected ("B and scales are exact-multiple in N") was false for scale_a, so the code was written to match a premise that did not hold. Nothing covered this class: num_records, max_size, buffer_resource and oob_ appear nowhere in rules.md, and B2 -- the one out-of-bounds rule -- is tl.load without a mask, which cannot fire on a backend that has no tl. A FlyDSL PR deriving memory-safety got B2 D1 G1. D12 -- a new ops-side contract the AOT pre-compiler was not taught. #4397 added resolve_flydsl_stage1_tile_n and resolve_flydsl_stage2_tile_k in one commit, wired only stage2 into AOT, and the stage1 drift lived 32 commits until #4429. Both collectors were checked against the commits that introduced the defects, not only against fixtures. flydslbounds reports arg_scale_a on 3910ab3 and falls silent on de9f1f8, so the fix does not trip its own rule. aotpair reports resolve_flydsl_stage1_tile_n on 3135022 and stays quiet about stage2 -- which that same commit did wire in -- which is the distinction the rule exists to make. The first cut of D12 looked for "ops changed, AOT untouched" and would have found nothing: #4397 does touch AOT (grouped_moe.py +19, moe.py +9). The defect is a path missed, not a side skipped. Separately, the card gate had exactly one way through and it was dishonest. On wave5 PR4862 an agent found a CI problem at Step 7 that no rule covered, the gate called it UNBACKED, and the only move that clears that gate is for the finding to have been known earlier -- so it edited answers.txt, a file that had already passed its own gate, and described this itself as "slightly dishonest bookkeeping". A gate whose only path through is fabrication trains fabrication. `-- late finding:` backed by an append-only late_findings.txt is the exit; a hash ledger keyed on the FIRST passing hash is the lock. Neither half works alone: the exit alone leaves the door open, the lock alone leaves a reviewer who genuinely found something late with nowhere to put it. Two changes planned from reading the code and dropped after measuring them: adding .cpp to is_kernel (aiter has 12 .cpp/.cc files and none contains a device kernel, so excluding them is correct) and dropping the .py test in flydsl-kernel (non-Python is deliberately left to the C path, and a test says so).
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.
The FlyDSL MoE AOT precompiler collapsed every non-Swiglu activation to "silu" when building compile jobs. ActivationType.Situv2 (used by the new kimik3_a8w4_tuned_fmoe.csv) therefore compiled its stage1 kernel under an act="silu" cache key, while runtime (fused_moe._flydsl_stage1_wrapper) looks it up under act="situv2". Under FLYDSL_RUNTIME_RUN_ONLY=1 that mismatch surfaces as "no usable AOT cache for launch_mixed_moe_gemm1", failing test_moe_2stage.
Mirror the runtime three-way mapping (and the existing grouped_moe AOT parser): Swiglu -> "swiglu", Situv2 -> "situv2", else "silu".
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist