Repository navigation
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
READY FOR HUMAN REVIEWPR Self-ReviewRevision Author self-review accepted. Readiness report: Author answers
Show the author's self-review answersBehavior and intentValidation and unverified scopePR-specific questionChanged op testsPR state
Copilot findings
Code and op-test hygiene
Required CI
Shadow mode reports what would block but keeps the status successful. Set |
* [FlyDSL] Tune DSv4.1 EP8 A8W4 MegaMoE * [FlyDSL] Preserve compile-time staging in prepare lint checks * [FlyDSL] Replace DSv4.1 final LDS inline asm with typed copy
Motivation
Improve DSv4.1-Flash native MX A8W4 MegaMoE on gfx950/EP8: H5120, I2304, 384 experts, top-k 6.
Technical Details
fx.copywith aligned Int32 views for the scoped final-K LDS load; tune existing Stage1/Stage2 parameters. No new public arguments, buffers, launches or wire formats.Test Plan
09ce86059: 73 paired reference/Graph/40×20-chain points, dynamic routes/unequal ranks, burst 2000, 32 production CPU AOT profiles and 37 GPU run-only points passed. GPU/whole-model tests were not rerun on this main-merge head; current CI is pending.Native correctness entry point (no private helper scripts):
For equal capacity, run each TPR separately with identical
--bs-list TPRand--max-tok-per-rank TPR(including 1/2/4/8).Test Result
Environment: 8×MI355X/gfx950, ROCm 7.2.4, PyTorch 2.10.0, FlyDSL 0.4.0, MORI 1.2.4. Uniform routing, seed 123, BF16 input, native MX A8W4, CUDA Graph, 10 timed replays; 8-rank mean E2E, µs. Speedup (%) =
(main / PR − 1) × 100%for the same workload (per-call speedup, not time reduction or a measured whole-model throughput gain); negative values are slower.Version scope: these are the complete 32-point paired tuning measurements: frozen main
9b1dfee26497versus the tested PR snapshot, before subsequent cleanup/address/32K tuning. They are not measurements of final PR head5f3bde107against current main. The later final-copy regression compares against the prior optimized PR, not main, and is not mixed into these tables. Differences below about 2% are not treated as established wins/regressions.Uniform routing: MTPR = MAX = 32768
All points use the compact path.
Uniform routing: MTPR = TPR
TPR ≤128 uses fixed-slot; TPR ≥256 uses compact. Equal capacity does not mean every row is fixed-slot.
Later, separate 32K tuning measured 10691.8 → 9997.3 µs on uniform routing (+6.95% performance improvement). The previously reported skewed-routing time reductions correspond to approximately +3.14% performance improvement for one-rank hotspots, +14.85% for Zipf 1.5 and +17.76% for rank-balanced paired hotspots (converted from the rounded original percentages). These later measurements are not substituted into the earlier full-scan rows. No universal 20% performance improvement or whole-model speedup is claimed.
Required PR self-review and current-head validation scope
PR Self-Review
Reviewed revision
5f3bde1078b80d80b7aaf6c39914f77d8cedc2ebBehavior and intent
Tune native A8W4 DSv4.1-Flash EP8 using the existing prepare, dispatch/GEMM1, GEMM2 and combine architecture. Preserve quantization order, protocol, public interface and unsupported-workload fallbacks. Main
8fd893402is merged without changing the previously validated MegaMoE implementation.Validation and unverified scope
Current-head CPU validation passed: 9,360 comparisons, 7,980 unchanged non-target outcomes, 1,240 identically rejected outcomes, 16 bundle plans, Python syntax, Black and Ruff. Historical GPU/AOT tests above identify their tested implementation; current-head GPU and whole-model performance remain unverified, and current CI is pending. Native MegaMoE tests are still skipped by the generic CI driver. Upstream #7290's updated timing table is included: a splitter dry-run places top-k in shard 0 and GEMM/concat-cache in shard 2 instead of packing all three into shard 4; actual new-run completion remains unverified.
PR-specific question
The tuning selector matches exactly
(experts_per_rank=48, model_dim=5120, inter_dim=2304, world_size=8, a_dtype='fp8'). CPU comparisons cover ten model/EPR geometries, EP2/4/8, FP8/FP4, all token/capacity buckets and boundary inputs. All non-target selections, P2P quantization modes and payload-chunk wire fields remain unchanged.Changed op tests
op_tests/multigpu_tests/test_mega_moe_v2.pyadds the DSv4.1-Flash model geometry and valid paired-fanout routes for top-k 6. Existing V4-Pro/GLM/R1/K3 profiles do not exercise this geometry; the old paired fixture assumed a larger top-k. Reuse the canonical runner instead of adding an experimental test file.