Repository navigation
[FlyDSL] [JIT] [gfx1250] Cut remaining host overhead in FlyDSL GEMM/MoE wrappers - #7006
Conversation
…ppers FlyDSL-only split of ROCm#6948 (the Triton gemm_a16w16 changes are dropped). Complements ROCm#6946 (compiled FlyDSL launcher cache). - batched mxfp8_32 GEMM: memoise the untuned-shape heuristic per M class (ceil(M / tile_m) per candidate tile, saturated past the M-block limit, plus M parity when an A-preshuffle candidate exists) instead of per exact M, and cache kernel-name parsing. Prefill hands every linear a new M each step; the pick is identical to the per-M heuristic. - get_mxscale_bpreshuffle_config: answer an N/K with no tuned row at any M without walking the padded-M levels, and log an untuned weight shape once per (N, K, w_scale_block) instead of once per M. - gemm_a8w8_blockscale -> gemm_a8w8_blockscale_bpreshuffle: the outer custom op's body calls the nested op's body directly instead of a second torch.ops dispatch. torch_compile_guard exposes the body it registered as ``_eager_body``; a rebound module attribute is still honoured. - grouped_gemm_gfx1250_a8w4: build debug strings only when AITER_GROUPED_DEBUG is on and skip the arch-override env reads on gfx1250. op_tests/test_gemm_host_dispatch_cache.py checks each cache against the uncached answer (CPU contracts plus bitwise GPU comparisons). Co-Authored-By: Claude Opus 5.5 <[email protected]>
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
|
Tested this PR in the matched MiniMax-M3 prefill workload on MI455/gfx1250. Configuration: Four-rank averages:
Validation on the combined tree: |
What
FlyDSL-only split of #6948 (closed): the Triton
gemm_a16w16changes (gluon layout memoisation, nestedgemm_a16w16_dispatch) are dropped, as the review suggested separating the backends. Complements #6946 (merged; caches compiled FlyDSL launchers). No kernel changes; kernel selection and outputs are unchanged.batched_gemm_a8w8_gfx1250): the heuristic depends on M only throughceil(M / tile_m)per candidate tile (saturated past the M-block limit), plus M parity when an A-preshuffle candidate exists, so that tuple is the cache key; kernel-name parsing is cached too. Identical result to the per-M heuristic; prefill hands every linear a new M each step.get_mxscale_bpreshuffle_config: early return for an N/K with no tuned row at any M, and the "untuned" warning is logged once per (N, K, w_scale) instead of once per M.gemm_a8w8_blockscale→gemm_a8w8_blockscale_bpreshuffle) viatorch_compile_guard's new_eager_bodyattribute, instead of a secondtorch.opsdispatch. A rebound module attribute is still honoured.grouped_gemm_gfx1250_a8w4:_grouped_dbgstrings are built only whenAITER_GROUPED_DEBUGis on, and the arch-override env reads are skipped on native gfx1250.Why
DeepSeek-V4.1-Flash serving on MI455X (gfx1250, ATOM TP4): prefill steps were dominated by Python dispatch in the op wrappers rather than GPU work.
Host us/call, gfx1250, DSV4.1 TP4 shapes, M=1758 (#6946 → #6946 + these changes, measured on #6948):
Outputs bitwise identical.
Testing
Re-run on this branch (main 699d750 + this commit), gfx1250 (MI455X), single GPU:
op_tests/test_gemm_host_dispatch_cache.py: 32 passed (the 11 Tritongemm_a16w16cases from [Triton/Gluon] [FlyDSL] [gfx1250] Cut remaining host overhead in GEMM wrappers #6948 were removed with that code).op_tests/test_gemm_group32_interface.py: 119 passed, 50 skipped.op_tests/test_flydsl_batched_gemm.py(script, 90 shapes): all error columns 0; every non-timing column (cos / mre / err) identical to the [Triton/Gluon] [FlyDSL] [gfx1250] Cut remaining host overhead in GEMM wrappers #6948 run.black --checkandruff check(0.16.0, repo config) clean on the changed files.🤖 Generated with Claude Code