Repository navigation
[FlyDSL] gfx942 MoE: offset and clamp fixes, num_local_tokens, clamped-SiLU default, V4.1-Flash rows - #7820
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: Reviews: |
WAITING ON AUTHORPR Self-ReviewRevision Waiting for the PR author. The readiness report will appear after the self-review answers are complete for this revision. Questions to answer in the PR description
Edit the Missing or invalid answers
Shadow mode reports what would block but keeps the status successful. Set |
9c9c929 to
da57bed
Compare
…d-SiLU default, V4.1-Flash rows
efe3ecc to
7bec3c6
Compare
ATOM runs the V4.1 DSpark draft with its shared expert unfused (128 experts, top-3), so the 129-expert/top-4 rows never match. The 1-stage kernel cannot apply swiglu_limit (it raises); say so in the comment.
…back; tests - Down's per-tensor activation scale reads only the rows before num_local_tokens: sorting's padding routes write a padding row. - With AITER_BYPASS_TUNE_CONFIG a clamped SiLU still takes the FlyDSL default. - Drop dsv41_fp8_ptpc_tuned_fmoe.csv: its rows equal the clamped-SiLU default. - Op test: the dispatch check asserts the chosen kernel; local_tokens padding keeps real expert ids and must not run (zero rows, and prefill equals the valid rows alone); V4.1-Flash's MoE shape, clamped with a row count.
…nd (#8178) #7361's guard ran before #7820's gfx942 FlyDSL path, so a clamped per-token FP8 SiLU at an inter_dim that is not a multiple of 128 raised (DeepSeek-V4.1-Flash TP4 on MI308X, inter_dim 576) and tuned impl__flydsl_gfx942__ rows were dropped, although that backend applies the clamp. Keep those rows, and check the CK limits only when no FlyDSL backend takes the call.
TP4 MI308X launch with DSpark (block 5), the radix cache, decode / verify / draft CUDA graphs up to 64 requests, the overlap scheduler and prefill token graphs; the aiter requirement on gfx942 (ROCm/aiter#7820, the clamped per-token FP8 MoE that 3102 routes V4.1's experts through); the kill switches for the prefill paths; optional prefill admission coalescing (--min-free-slots-delay) with its measured trade-off; measured wall time, TTFT and TPOT against native ATOM DSpark with prefix caching on GSM8K (shared 8-shot and cold 3-shot, c32/48/64), random 4096-token prompts and long documents, with a re-check on 3102 at 1119304. It also documents the radix cache's environment variables, read by the plugin (atom/plugin/sglang/deepseek_v41_envs.py), and that #7820 has to sit on an aiter main with #7407 (get_mla_sparse_prefill_v41_backend). Co-Authored-By: Claude Opus 5.5 <[email protected]>
On gfx942 a clamped per-token FP8 SiLU that CK can clamp (FP8, inter_dim a multiple of 128) is routed to the FlyDSL whole-graph default from ROCm#7820 / ROCm#8178. That backend's metadata has stage1=None, so test_plain_fp8_swiglu_limit_dispatch, which reads md.stage1.keywords, crashes with AttributeError: 'NoneType' object has no attribute 'keywords' -- MI300X shard 5 on main, most recently run 45246107786. The route is also the wrong one for these calls: the whole-graph backend clamps the BF16 activations it reads, a different quantization point from the per-token path the call and the tuned rows from ROCm#7361 ask for. (The accuracy claim in ROCm#8334 about that backend is retracted; it is accurate against its own reference, see ROCm#8350.) Keep the whole-graph default only where CK rejects the shape (inter_dim not a multiple of 128, including V4.1-Flash at 576). The new predicate is the same one the NotImplementedError gate below uses, which is what defines what CK's runtime-limit stage-1 accepts. A tuned impl__flydsl_gfx942__ row still wins. This does not revert ROCm#7361. Fixes ROCm#8334 Co-authored-by: Cursor <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
On gfx942 a clamped per-token FP8 SiLU that CK can clamp (FP8, inter_dim a multiple of 128) is routed to the FlyDSL whole-graph default from ROCm#7820 / ROCm#8178. That backend's metadata has stage1=None, so test_plain_fp8_swiglu_limit_dispatch, which reads md.stage1.keywords, crashes with AttributeError: 'NoneType' object has no attribute 'keywords' -- MI300X shard 5 on main, most recently run 45246107786. The route is also the wrong one for these calls: the whole-graph backend clamps the BF16 activations it reads, a different quantization point from the per-token path the call and the tuned rows from ROCm#7361 ask for. (The accuracy claim in ROCm#8334 about that backend is retracted; it is accurate against its own reference, see ROCm#8350.) Keep the whole-graph default only where CK rejects the shape (inter_dim not a multiple of 128, including V4.1-Flash at 576). The new predicate is the same one the NotImplementedError gate below uses, which is what defines what CK's runtime-limit stage-1 accepts. A tuned impl__flydsl_gfx942__ row still wins. This does not revert ROCm#7361. Fixes ROCm#8334 Co-authored-by: Cursor <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
On gfx942 a clamped per-token FP8 SiLU that CK can clamp (FP8, inter_dim a multiple of 128) is routed to the FlyDSL whole-graph default from #7820 / #8178. That backend's metadata has stage1=None, so test_plain_fp8_swiglu_limit_dispatch, which reads md.stage1.keywords, crashes with AttributeError: 'NoneType' object has no attribute 'keywords' -- MI300X shard 5 on main, most recently run 45246107786. The route is also the wrong one for these calls: the whole-graph backend clamps the BF16 activations it reads, a different quantization point from the per-token path the call and the tuned rows from #7361 ask for. (The accuracy claim in #8334 about that backend is retracted; it is accurate against its own reference, see #8350.) Keep the whole-graph default only where CK rejects the shape (inter_dim not a multiple of 128, including V4.1-Flash at 576). The new predicate is the same one the NotImplementedError gate below uses, which is what defines what CK's runtime-limit stage-1 accepts. A tuned impl__flydsl_gfx942__ row still wins. This does not revert #7361. Fixes #8334 Co-authored-by: Cursor <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Motivation
DeepSeek-V4.1-Flash on MI308X (ROCm/ATOM#3102) runs its routed experts as per-token FP8 with
swiglu_limitthroughfused_moe, on the gfx942 FlyDSL backend.Changes
swiglu_limit.num_local_tokens. The gfx942 backend takes it:moe_sortingon the sorted paths, the batch-1 kernels read it themselves, and a per-tensor activation scale reads only the rows before it. With it,fused_moekeeps a FlyDSL row only for the clamped SiLU; other activations keep the default heuristics.swiglu_limitand no FlyDSL row in use,fused_moeruns the FlyDSL backend at a token-count default (fused_moe_gfx942.default_config) instead of the 1-stage kernel, which cannot apply the clamp.Testing (MI308X)
op_tests/test_flydsl_moe_gfx942.pypasses, including thelocal_tokenscases (batch-1, decode, prefill; per-token and per-tensor; stale padding rows that must not run), V4.1-Flash's MoE shape clamped with a row count, and the dispatch checks (kept rows, the clamped-SiLU default, bypass, EP).op_tests/test_gemm_a8w8_bpreshuffle_pad_k.pypasses.fused_moepath (routed experts and dense GEMMs in per-channel FP8): GSM8K 3-shot, full set, 0.923, and 0.929 with DSpark.