Skip to content

[HIP] [CI] Generate MXFP4 MoE aux kernels for (64, 4096, 4096, 2) - #7938

Merged
yzhou103 merged 5 commits into
ROCm:mainfrom
mpashkovskii:mxfp4-aux-muse-spark-tp4ep4
Nov 30, 2026
Merged

yzhou103 merged 5 commits into
ROCm:mainfrom
mpashkovskii:mxfp4-aux-muse-spark-tp4ep4

Conversation

@mpashkovskii

@mpashkovskii mpashkovskii commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Motivation

Muse-Spark-Open-816B-A42B served at TP=4 with expert parallel (EP=4) runs the MXFP4 fused MoE with 64 local experts, hidden 4096, intermediate 4096 and top-2 routing. The generated MXFP4 aux kernels don't cover this shape, which has two effects:

  1. csrc/ck_gemm_moe_2stages_codegen/gemm_moe_tune.py --mxfp4-flydsl aborts the whole tuning process at token >= 2048, on the first candidate whose stage-2 epilogue needs the scatter-reduce helper:
    mxfp4_moe_scatter_reduce: no codegen'd instance for shape key 'aux_scatter_H4096_TOPK2_NT1'. Earlier tuning of this model lost token 2048 / 8192 / 16384 this way.
  2. fused_moe rejects tuned MXMOE rows for the shape: discarding MXMOE config: generated MXFP4 auxiliary kernels do not cover (expert=64, model_dim=4096, inter_dim=4096, topk=2).

Technical Details

Adds (64, 4096, 4096, 2) to SHAPES in csrc/kernels/mxfp4_moe/moe_aux/codegen/gen_instances.py and to MXFP4_MOE_SUPPORTED_SHAPES in aiter/ops/moe_mxfp4_aux.py (kept in sync, checked by op_tests/test_mxfp4_moe_aux_codegen.py). No kernel or dispatch changes; on this head the generator emits 474 instances, 16 more than main (458): sortonly/sortzi/sort_quant for NE64_TOPK2_H4096, quant and sort3s for MB32/64/128, sortscales for BM32/64/128, and scatter/scatterq H4096_TOPK2 NT0/NT1.

op_tests/test_moe_scatter_reduce.py was pinned to H=6144, TOPK=5; it is now parametrized over (D_HIDDEN, TOPK) with a (4096, 2) case, so the new aux_scatter{,q}_H4096_TOPK2_NT{0,1} instances are compiled and run against the fp32 reference. .github/scripts/aiter_test.sh now runs that file through python3 -m pytest: it has pytest-style tests and no script entry point, so the previous python3 op_tests/test_moe_scatter_reduce.py invocation exited 0 without running any case. The MXFP4 scatter_reduce_q test is skipped unless get_gfx_runtime() == "gfx950", because opus::fp4_to_fp32_packed_x8 is a zero-returning stub on gfx942 and MI300X jobs would otherwise fail it; the BF16 scatter tests run on every arch.

Scope: with expert parallel, fused_moe still rejects MXMOE rows (the MXMOE output_aux sort drops expert_mask). That is unchanged here, so this alone does not make MXMOE rows usable for the EP deployment; it fixes the tuner abort and covers the shape for non-EP use.

Not a duplicate

No open PR adds MXFP4 aux shapes for this model (gh pr list --repo ROCm/aiter --search "gen_instances mxfp4 aux", "muse spark mxfp4 aux").

Test Plan

python3 -m pytest op_tests/test_mxfp4_moe_aux_codegen.py -q
python3 csrc/kernels/mxfp4_moe/moe_aux/codegen/gen_instances.py --working_path /tmp/gen && ls /tmp/gen/instances | wc -l
python3 -m pytest op_tests/test_moe_scatter_reduce.py -q   # gfx950

Earlier, on MI350P (gfx950, 128 CUs), with the same two lines applied to an older installed aiter (not this head):

  • rebuild module_moe_mxfp4_aux and call mxfp4_moe_scatter_reduce for NE=64, TOPK=2, D_HIDDEN=4096 against a reference;
  • fused_moe.get_2stage_cfgs(...) for the shape with a tuned MXMOE row (non-EP): the row is used instead of rejected;
  • gemm_moe_tune.py --mxfp4-flydsl for token 8 to 16384.

Test Result

  • test_mxfp4_moe_aux_codegen.py: 3 passed.
  • gen_instances.py on this head: 474 instances (458 on main + 16 for the new shape).
  • Older installed aiter (not this head; its module had 407 instances): mxfp4_moe_scatter_reduce for the new shape matched the reference (max abs error 0.015, bf16 rounding).
  • test_moe_scatter_reduce.py with the new (4096, 2) cases: pending a gfx950 run on this head (CI MI35X).
  • get_2stage_cfgs (non-EP) now returns the tuned MXMOE kernels for token 8 and 2048 (using 2stage (kernelName1='flydsl_mxmoe_g1_a4w4_...')) instead of the "do not cover" rejection.
  • The tuner completes all 10 token counts with no abort. The scatter epilogue it can now evaluate does not win for this shape (top-2 routing): at token 8192 / 16384 the best scatter candidate is 3.8% / 3.1% slower than the best atomic one.

PR Self-Review

Reviewed revision

baf8bd1768d5276cc32e9b60e5c1bd728fdb9c5a

Behavior and intent

Adds (64, 4096, 4096, 2) to both MXFP4 aux shape catalogs, so module_moe_mxfp4_aux now generates the BM16 sort (sort-only and zero-init) instances for NE=64, TOPK=2, D_HIDDEN=4096 and the scatter / scatter-q instances for the (H=4096, TOPK=2) key. Before this, the shape was missing: gemm_moe_tune.py --mxfp4-flydsl aborted at token >= 2048 with no codegen'd instance for shape key 'aux_scatter_H4096_TOPK2_NT1', and fused_moe discarded tuned MXMOE rows for the shape with "generated MXFP4 auxiliary kernels do not cover". No kernel source, dispatch logic or selection rules change; only the generated instance set grows (474 instances on this head vs 458 on main). test_moe_scatter_reduce.py is parametrized so the new scatter instances are exercised by a test.

Validation and unverified scope

On this head: python3 csrc/kernels/mxfp4_moe/moe_aux/codegen/gen_instances.py --working_path /tmp/gen emits 474 instances; the same script on main emits 458, and the 16-file difference is exactly the new-shape instances listed under Technical Details. black and ruff 0.16.0 pass on the changed test; bash -n .github/scripts/aiter_test.sh passes and the op_tests/test_moe_scatter_reduce.py path from the runner's find op_tests -maxdepth 1 list matches the new pytest case.

Earlier, on MI350P (gfx950, 128 CUs) with the two lines applied to an older installed aiter (not this head; its module had 407 instances, which is why that count differs):

  • python3 -m pytest op_tests/test_mxfp4_moe_aux_codegen.py -q: 3 passed (every supported shape has a generated instance).
  • mxfp4_moe_scatter_reduce for NE=64, TOPK=2, D_HIDDEN=4096 matched a reference (max abs error 0.015, bf16 rounding).
  • fused_moe.get_2stage_cfgs(...) (non-EP) returns the tuned flydsl_mxmoe_g1_a4w4_... kernels for token 8 and 2048 instead of the "do not cover" rejection.
  • gemm_moe_tune.py --mxfp4-flydsl completes all 10 token counts (8 to 16384) with no abort; the scatter epilogue loses to atomic for this shape (3.8% / 3.1% slower at 8192 / 16384).

Unverified / not covered: module_moe_mxfp4_aux has not yet been built and op_tests/test_moe_scatter_reduce.py has not yet been run on this head on gfx950 (pending CI MI35X); the new sort instances were exercised through get_2stage_cfgs and the tuner, but not compared element-wise against a reference sort; no end-to-end model accuracy run (no lm_eval / served Muse Spark run) was done with this change; MI300X (gfx942) was not tested because the MXFP4 aux path is gfx950-only. The EP deployment (expert_mask set) remains unchanged and still does not use these generated kernels, as noted under Technical Details.

PR-specific question

Architecture: the generated aux kernels are only reached through the MXFP4 FlyDSL MXMOE path, which is gfx950-only (gemm_moe_tune.py refuses non-gfx950 GPUs for --mxfp4-flydsl; the fused decode sort/quant gate checks get_gfx_runtime() == "gfx950"). Dtype: bf16 activations with QuantType.per_1x32 MXFP4 (fp4x2) weights and a bf16 output buffer for scatter-reduce. Shape: the sort instances are selected by the exact (NE, TOPK, D_HIDDEN, MB=16) key, here (64, 2, 4096); is_mxfp4_moe_shape_supported additionally requires inter_dim rounded up to 256 to equal 4096; the scatter instances are keyed by (model_dim, topk) = (4096, 2) only, so is_mxfp4_moe_scatter_supported now also admits the scatter epilogue in tuning for any other H=4096, topk=2 model, which is safe because the instance is generic over expert count and inter_dim.

CI change: .github/scripts/aiter_test.sh only adds op_tests/test_moe_scatter_reduce.py to an existing case branch that switches the command from python3 "$file" to python3 -m pytest -q "$file" under the same timeout 60m. It runs in the existing pull_request-triggered aiter-test.yaml jobs, which already execute PR op_tests/ code; no workflow permissions, secrets, triggers or interpolation of PR text change, so fork code or text gains no new path to a privileged context. pytest exits non-zero if collection or any case fails, so an empty or broken run can no longer pass silently.

Invariant against unsupported inputs: fused_moe only takes the generated sort when expert_mask is None and _mxfp4_aux_instance_supported(experts, topk, hidden, block_m, zero_init) is true, otherwise it falls back to the Opus aux sort or discards the MXMOE row with a logged reason; prepare_mxfp4_moe_aux raises _MissingMxfp4MoeAuxInstances if a stale built module lacks the instance; and test_mxfp4_moe_aux_codegen.py fails if a shape in MXFP4_MOE_SUPPORTED_SHAPES has no matching entry in gen_instances.SHAPES. Existing shapes keep their selection because entries are only added, none changed or removed.

Changed op tests

op_tests/test_moe_scatter_reduce.py: the four kernel tests (BF16 reference, negative/out-of-bounds skips, MXFP4 scatter_reduce_q reference, last-row/all-skipped) are parametrized over (D_HIDDEN, TOPK) in ((6144, 5), (4096, 2)). Before this, only the MiniMax-M3 key was run, so nothing compiled or executed aux_scatter{,q}_H4096_TOPK2_NT{0,1}; test_mxfp4_moe_aux_codegen.py only checks that the catalogs agree, not that the kernels run. Not redundant: no other op test calls mxfp4_moe_scatter_reduce for H=4096, TOPK=2. The (6144, 5) cases keep the same coverage as before (the last-row map is identical; the skip map uses the same bad indices in different slots). The MXFP4 test is skipped off gfx950 because the FP4 decode is only implemented there; the BF16 tests are arch-independent.

AI assistance (Claude) was used to find the cause, make the change, and run the tests; a human must review every line before merge.

🤖 Generated with Claude Code

Muse-Spark-Open-816B-A42B served at TP=4 with expert parallel (EP=4)
runs the MXFP4 fused MoE with 64 local experts, hidden 4096,
intermediate 4096 and top-2 routing. The generated MXFP4 aux kernels
(sort/quant, sort, quant, scatter-reduce) did not cover this shape:

- the MoE tuner (gemm_moe_tune.py --mxfp4-flydsl) aborts the whole
  process on the first candidate that needs the scatter-reduce
  epilogue (no instance for aux_scatter_H4096_TOPK2), at token >= 2048;
- fused_moe rejects tuned MXMOE rows for the shape ("generated MXFP4
  auxiliary kernels do not cover ...").

Add the shape to gen_instances.py SHAPES and to
MXFP4_MOE_SUPPORTED_SHAPES. With expert parallel, MXMOE rows are still
rejected for the expert_mask reason; that is unchanged here.

Co-Authored-By: Claude <[email protected]>
@mpashkovskii
mpashkovskii requested review from a team and a balanced review from Copilot November 13, 2026 13:21
@github-actions github-actions Bot changed the title [FlyDSL] Generate MXFP4 MoE aux kernels for (64, 4096, 4096, 2) [HIP] Generate MXFP4 MoE aux kernels for (64, 4096, 4096, 2) Nov 13, 2026
@github-actions github-actions Bot added the HIP label Nov 13, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

  • ✅ Pre-checks (submodule verification, code formatting)
  • ✅ Aiter standard tests on MI35X
  • ✅ Triton tests on MI35X (only when aiter/ops/triton/** or related paths are changed)

Extended tests (opt-in via labels):

Label Tests
ci:mi300x Run Aiter standard tests on MI300X in PRs; main branch always runs them
ci:gfx1250-ffm-triton Run the five-shard gfx1250 FFM Triton test suite
ci:triton-300x Run an additional Triton test job on MI300X in PRs (added automatically when gfx942 configs change); main branch always runs both MI35X and MI300X
ci:triton-355 Run the full Triton test suite on MI35X, not only the tests the change affects
ci:windows Windows JIT op smoke test on the Radeon R9700 ROCm runner
ci:multi-gpu Aiter multi-GPU tests on the 8-GPU runner
ci:sglang SGLang integration tests: DeepSeek-R1-MXFP4 accuracy, Qwen 3.5 accuracy
ci:atom ATOM benchmark: DeepSeek-R1-0528, GPT-OSS-120B
ci:atom_full ATOM accuracy suite for PR and main models from ATOM models_accuracy.json
ci:vllm vLLM benchmark: DeepSeek-V4-Pro, MiniMax-M3-MXFP4
ci:all All standard extended tests (excludes ci:atom_full)

Only add ci:atom_full for FlyDSL or Triton upgrades.
Add labels via the sidebar or gh pr edit 7938 --add-label <label>

One backend per PR:
A PR changes one kernel backend: [Triton/Gluon] (Triton and Gluon count as one), [HIP], [ASM], [CK], [OPUS] or [FlyDSL]. If the title ends up with two backend tags, split the PR -- as stacked pull requests when one part cannot merge without the other.

PR title tags & labels:
Component tags ([Triton/Gluon], [HIP], [CK], [ASM], ...) are added to the PR title and as PR labels automatically from the changed files and re-synced on every push — change-type tags like [fix]/[Perf], op tags like [MLA], and human labels (ci:*) are left untouched. Add the no-auto-title label to stop the title rewrites; labels stay in sync either way.

Reviews:
A reviewer is usually assigned within one working day after the PR is ready for review (see Code Review Process). If nobody has responded for about a week, mention the area contact listed in CONTACTS.md. Want to help review? See REVIEWERS.md.

@aiter-bot

aiter-bot commented Nov 13, 2026 •

Copy link
Copy Markdown

READY FOR HUMAN REVIEW

PR Self-Review

Revision baf8bd1768d5 · mode shadow

Author self-review accepted. Readiness report:

Author answers

  • PASS — current-SHA answers are present and structurally specific
Show the author's self-review answers

Behavior and intent

Adds `(64, 4096, 4096, 2)` to both MXFP4 aux shape catalogs, so `module_moe_mxfp4_aux` now generates the BM16 sort (sort-only and zero-init) instances for `NE=64, TOPK=2, D_HIDDEN=4096` and the scatter / scatter-q instances for the `(H=4096, TOPK=2)` key. Before this, the shape was missing: `gemm_moe_tune.py --mxfp4-flydsl` aborted at token >= 2048 with `no codegen'd instance for shape key 'aux_scatter_H4096_TOPK2_NT1'`, and `fused_moe` discarded tuned MXMOE rows for the shape with "generated MXFP4 auxiliary kernels do not cover". No kernel source, dispatch logic or selection rules change; only the generated instance set grows (474 instances on this head vs 458 on `main`). `test_moe_scatter_reduce.py` is parametrized so the new scatter instances are exercised by a test.

Validation and unverified scope

On this head: `python3 csrc/kernels/mxfp4_moe/moe_aux/codegen/gen_instances.py --working_path /tmp/gen` emits 474 instances; the same script on `main` emits 458, and the 16-file difference is exactly the new-shape instances listed under Technical Details. `black` and `ruff 0.16.0` pass on the changed test; `bash -n .github/scripts/aiter_test.sh` passes and the `op_tests/test_moe_scatter_reduce.py` path from the runner's `find op_tests -maxdepth 1` list matches the new pytest case.

Earlier, on MI350P (gfx950, 128 CUs) with the two lines applied to an older installed aiter (not this head; its module had 407 instances, which is why that count differs):

- `python3 -m pytest op_tests/test_mxfp4_moe_aux_codegen.py -q`: 3 passed (every supported shape has a generated instance).
- `mxfp4_moe_scatter_reduce` for `NE=64, TOPK=2, D_HIDDEN=4096` matched a reference (max abs error 0.015, bf16 rounding).
- `fused_moe.get_2stage_cfgs(...)` (non-EP) returns the tuned `flydsl_mxmoe_g1_a4w4_...` kernels for token 8 and 2048 instead of the "do not cover" rejection.
- `gemm_moe_tune.py --mxfp4-flydsl` completes all 10 token counts (8 to 16384) with no abort; the scatter epilogue loses to atomic for this shape (3.8% / 3.1% slower at 8192 / 16384).

Unverified / not covered: `module_moe_mxfp4_aux` has not yet been built and `op_tests/test_moe_scatter_reduce.py` has not yet been run on this head on gfx950 (pending CI MI35X); the new sort instances were exercised through `get_2stage_cfgs` and the tuner, but not compared element-wise against a reference sort; no end-to-end model accuracy run (no lm_eval / served Muse Spark run) was done with this change; MI300X (gfx942) was not tested because the MXFP4 aux path is gfx950-only. The EP deployment (`expert_mask` set) remains unchanged and still does not use these generated kernels, as noted under Technical Details.

PR-specific question

Architecture: the generated aux kernels are only reached through the MXFP4 FlyDSL MXMOE path, which is gfx950-only (`gemm_moe_tune.py` refuses non-gfx950 GPUs for `--mxfp4-flydsl`; the fused decode sort/quant gate checks `get_gfx_runtime() == "gfx950"`). Dtype: bf16 activations with `QuantType.per_1x32` MXFP4 (`fp4x2`) weights and a bf16 output buffer for scatter-reduce. Shape: the sort instances are selected by the exact `(NE, TOPK, D_HIDDEN, MB=16)` key, here `(64, 2, 4096)`; `is_mxfp4_moe_shape_supported` additionally requires `inter_dim` rounded up to 256 to equal 4096; the scatter instances are keyed by `(model_dim, topk) = (4096, 2)` only, so `is_mxfp4_moe_scatter_supported` now also admits the scatter epilogue in tuning for any other `H=4096, topk=2` model, which is safe because the instance is generic over expert count and inter_dim.

CI change: `.github/scripts/aiter_test.sh` only adds `op_tests/test_moe_scatter_reduce.py` to an existing `case` branch that switches the command from `python3 "$file"` to `python3 -m pytest -q "$file"` under the same `timeout 60m`. It runs in the existing `pull_request`-triggered `aiter-test.yaml` jobs, which already execute PR `op_tests/` code; no workflow permissions, secrets, triggers or interpolation of PR text change, so fork code or text gains no new path to a privileged context. pytest exits non-zero if collection or any case fails, so an empty or broken run can no longer pass silently.

Invariant against unsupported inputs: `fused_moe` only takes the generated sort when `expert_mask is None` and `_mxfp4_aux_instance_supported(experts, topk, hidden, block_m, zero_init)` is true, otherwise it falls back to the Opus aux sort or discards the MXMOE row with a logged reason; `prepare_mxfp4_moe_aux` raises `_MissingMxfp4MoeAuxInstances` if a stale built module lacks the instance; and `test_mxfp4_moe_aux_codegen.py` fails if a shape in `MXFP4_MOE_SUPPORTED_SHAPES` has no matching entry in `gen_instances.SHAPES`. Existing shapes keep their selection because entries are only added, none changed or removed.

Changed op tests

`op_tests/test_moe_scatter_reduce.py`: the four kernel tests (BF16 reference, negative/out-of-bounds skips, MXFP4 `scatter_reduce_q` reference, last-row/all-skipped) are parametrized over `(D_HIDDEN, TOPK)` in `((6144, 5), (4096, 2))`. Before this, only the MiniMax-M3 key was run, so nothing compiled or executed `aux_scatter{,q}_H4096_TOPK2_NT{0,1}`; `test_mxfp4_moe_aux_codegen.py` only checks that the catalogs agree, not that the kernels run. Not redundant: no other op test calls `mxfp4_moe_scatter_reduce` for `H=4096, TOPK=2`. The `(6144, 5)` cases keep the same coverage as before (the last-row map is identical; the skip map uses the same bad indices in different slots). The MXFP4 test is skipped off gfx950 because the FP4 decode is only implemented there; the BF16 tests are arch-independent.

AI assistance (Claude) was used to find the cause, make the change, and run the tests; a human must review every line before merge.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

PR state

  • PASS — pull request is marked ready for review

Copilot findings

  • PASS — no active Copilot finding lacks a substantive author reply

Code and op-test hygiene

  • PASS — no committed artifact or conflict marker detected

Required CI

  • PASS — Black: passed
  • PASS — Ruff: passed
  • PASS — Repository dependency: passed
  • PASS — Aiter Test Gate: passed

Shadow mode reports what would block but keeps the status successful. Set AITER_PR_SELF_REVIEW_MODE=enforce only after reviewing real false positives.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the added MXFP4 MoE shape coverage.

No open issues 🎉

What changed in this PR

This PR extends AITER’s MXFP4 MoE auxiliary-kernel coverage to (64, 4096, 4096, 2), addressing missing instances during tuning and enabling tuned MXMOE rows for non-expert-parallel use.

Changes:

  • Adds the shape to both the kernel generator and the wrapper’s supported-shape set.
  • Leaves kernel implementations, dispatch logic, and existing expert-parallel restrictions unchanged.
File Description
csrc/​kernels/​mxfp4_moe/​moe_aux/​codegen/​gen_instances.py Adds the shape to auxiliary-kernel instance generation.
aiter/​ops/​moe_mxfp4_aux.py Adds matching coverage to the supported-shape set.

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings November 25, 2026 07:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the added MXFP4 MoE auxiliary-kernel shape coverage.

No open issues 🎉

Review effort: Balanced

@mpashkovskii

Copy link
Copy Markdown
Contributor Author

I have reviewed every line of this PR and the self-review answers for revision f486ffee0c3a are now in the description. There are no open review threads, and Copilot's review of the current head found no issues. Ready for merge once the remaining CI checks finish.

@yzhou103

Copy link
Copy Markdown
Contributor

@valar-cop review

@valar-cop valar-cop left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some changes needed..

please quote a module_moe_mxfp4_aux build on this head, the 407 count is from a different tree

ci green.

Comment thread aiter/ops/moe_mxfp4_aux.py Resolved
yzhou103
yzhou103 previously approved these changes Nov 25, 2026

@yzhou103 yzhou103 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check the comment

@yzhou103
yzhou103 dismissed their stale review November 25, 2026 07:56

there are comments

Run the BF16 and MXFP4 scatter-reduce reference and bounds tests for both
H=6144/TOPK=5 and the new H=4096/TOPK=2 key so the generated
aux_scatter{,q}_H4096_TOPK2_NT{0,1} instances are compiled and executed.
Copilot AI balanced review requested due to automatic review settings November 25, 2026 08:01
@mpashkovskii

Copy link
Copy Markdown
Contributor Author

@yzhou103 fixed the issues

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new regression cases are not executed by Aiter CI because the runner invokes the test file directly without a script entry point, leaving the BF16/MXFP4 reference and bounds checks unverified.

1 open issue

Review effort: Balanced

Comment thread op_tests/test_moe_scatter_reduce.py Resolved
The file has pytest-style tests and no script entry point, so
`python3 op_tests/test_moe_scatter_reduce.py` imported it and exited 0
without running a case.
Copilot AI balanced review requested due to automatic review settings November 25, 2026 08:09
@github-actions github-actions Bot changed the title [HIP] Generate MXFP4 MoE aux kernels for (64, 4096, 4096, 2) [HIP] [CI] Generate MXFP4 MoE aux kernels for (64, 4096, 4096, 2) Nov 25, 2026
@github-actions github-actions Bot added the CI label Nov 25, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The MXFP4 test lacks a gfx950-only guard, so MI300X/gfx942 CI jobs run a conversion that returns zeros and cannot match the nonzero reference.

1 open issue
1 resolved since last review

Review effort: Balanced

Comment thread op_tests/test_moe_scatter_reduce.py Resolved
opus::fp4_to_fp32_packed_x8 is a zero-returning stub on gfx942, so the
packed-FP4 scatter output cannot match the reference in MI300X jobs now
that the file runs under pytest. BF16 scatter tests stay enabled.
Copilot AI balanced review requested due to automatic review settings November 25, 2026 08:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human review must confirm pending current-head gfx950 build and reference-test results for the new HIP sort and scatter instances, since older installed-aiter runs do not validate this revision.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@mpashkovskii

Copy link
Copy Markdown
Contributor Author

The three failing Aiter Test shards on baf8bd1 are CI infrastructure failures, not this change: 4/8, 5/8 and 7/8 (MI35X) never ran a test. In each, Download Aiter wheel artifact (aiter-whl-45574712638-py3.12, 632 MB) hung until its 30-minute timeout and Retry Download Aiter wheel artifact did the same (5/8: "Artifact download failed after 5 retries"); Collect test logs then failed on pip install speedtest-cli (externally-managed-environment). The same artifact downloaded fine in shards 0, 1, 3 and 6, and the tests this PR touches ran in shard 6 and passed.

I don't have the rights to re-run jobs here. Could a maintainer re-run the failed jobs once the run completes?

@mpashkovskii

Copy link
Copy Markdown
Contributor Author

@yzhou103 three shard tests failed to download the artefact everything else is green

@mpashkovskii

Copy link
Copy Markdown
Contributor Author

@yzhou103 the Aiter Test / Standard Tests (1 GPU) (linux-aiter-mi35x-1, MI35X, 8, 7) check reported as failed but I think it hanged actually. How can I rerun it?

@yzhou103
yzhou103 merged commit d22923b into ROCm:main Nov 30, 2026
102 of 109 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants