Repository navigation
[HIP] [CK] Revert " Add relu2 (Squared ReLU) activation support to CK-Tile fused MoE GEMM (#5708)" - #6142
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
One backend per PR: PR title tags & labels: |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The CK gitlink remains uncorrected, while the revert reintroduces unsafe Relu2 memory access and invalid CK-Tile dispatch behavior.
Review effort: Balanced
Findings: 4
Open (4)
What changed in this PR
Reverts CK-Tile fused MoE Relu2 support because its CK dependency commit is unavailable upstream.
Changes:
- Removes Relu2 enum, routing, code generation, and tests.
- Restores prior quantization conversion behavior.
- Reverts standalone Relu2 safety handling.
| File | Description |
|---|---|
op_tests/test_moe_2stage.py |
Removes Relu2-specific test configuration. |
csrc/kernels/quant_mxfp6_gemm.cu |
Restores direct float casts. |
csrc/kernels/quant_mxfp4.cu |
Restores direct float casts. |
csrc/kernels/activation_kernels.cu |
Removes bounds-safe Relu2 launching. |
csrc/include/rocm_ops.hpp |
Removes the public Relu2 binding. |
csrc/include/aiter_enum.h |
Removes the Relu2 enum value. |
csrc/ck_tile_gemm_moe_2stages/moe_cktile2stages.cu |
Removes Relu2 dispatch. |
csrc/ck_tile_gemm_moe_2stages/moe_cktile2stages_common.py |
Removes Relu2 codegen mapping. |
csrc/ck_tile_gemm_moe_2stages/include/moe_cktile2stages_common.cuh |
Removes the Relu2 fused activation. |
csrc/ck_tile_gemm_moe_2stages/gen_instances.py |
Removes Relu2 kernel generation. |
aiter/ops/quant.py |
Removes the Relu2 reference mapping. |
aiter/fused_moe.py |
Removes Relu2 validation and backend routing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…rinsics (#13071) ## Proposed changes ISSUE ID: ROCm/aiter#6142 Upstreams two commits originally developed locally alongside ROCm/aiter#5708 (relu2/Squared-ReLU MoE support for CK-Tile fused MoE GEMM). They were applied directly to a local CK submodule checkout rather than submitted upstream, which caused aiter's CK submodule pin to reference an unfetchable commit — see ROCm/aiter#6142 (revert) for full context. 1. `Add MoeRelu2 activation functor for gate-only MoE flatmm kernel` — adds the MoeRelu2 functor to `projects/composablekernel/include/ck_tile/ops/flatmm/kernel/moe_flatmm_kernel.hpp`, needed for non-gated (Squared ReLU) MoE activations used by NemotronH. 2. `Fix half_t intrinsics (neg/sin/exp/log) via float round-trip for gfx950` — fixes `projects/composablekernel/include/ck/utility/math_v2.hpp`. Once merged, aiter's CK submodule pin will be updated to reference this commit, and the relu2 MoE GEMM support PR will be resubmitted against aiter (see ROCm/aiter#5708 for the original implementation and test results, which remain valid). Note on test coverage: these two commits were already exercised as part of ROCm/aiter#5708's test plan (op-level and kernel-level tests on real gfx950 hardware, including production-scale E=512/topk=22 sweeps — see that PR for full results). No new CK-level unit test is included in this PR since the functor is only exercised through aiter's op_tests, not CK's own test suite; happy to add a CK-side test if the review team wants one here specifically. ## Checklist - [x] I have added tests relevant to the introduced functionality, and the unit tests are passing locally (carried over from original local testing in ROCm/aiter#5708 — op-level and kernel-level tests passed on real gfx950 hardware) - [ ] I have added inline documentation - [ ] I have run clang-format on all changed files --------- Signed-off-by: Shantipriya Parida <[email protected]> Co-authored-by: JiaLuo-CAN <[email protected]>
[composablekernel] Add MoeRelu2 activation functor and fix half_t intrinsics (#13071) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Proposed changes ISSUE ID: ROCm/aiter#6142 Upstreams two commits originally developed locally alongside ROCm/aiter#5708 (relu2/Squared-ReLU MoE support for CK-Tile fused MoE GEMM). They were applied directly to a local CK submodule checkout rather than submitted upstream, which caused aiter's CK submodule pin to reference an unfetchable commit — see ROCm/aiter#6142 (revert) for full context. 1. `Add MoeRelu2 activation functor for gate-only MoE flatmm kernel` — adds the MoeRelu2 functor to `projects/composablekernel/include/ck_tile/ops/flatmm/kernel/moe_flatmm_kernel.hpp`, needed for non-gated (Squared ReLU) MoE activations used by NemotronH. 2. `Fix half_t intrinsics (neg/sin/exp/log) via float round-trip for gfx950` — fixes `projects/composablekernel/include/ck/utility/math_v2.hpp`. Once merged, aiter's CK submodule pin will be updated to reference this commit, and the relu2 MoE GEMM support PR will be resubmitted against aiter (see ROCm/aiter#5708 for the original implementation and test results, which remain valid). Note on test coverage: these two commits were already exercised as part of ROCm/aiter#5708's test plan (op-level and kernel-level tests on real gfx950 hardware, including production-scale E=512/topk=22 sweeps — see that PR for full results). No new CK-level unit test is included in this PR since the functor is only exercised through aiter's op_tests, not CK's own test suite; happy to add a CK-side test if the review team wants one here specifically. ## Checklist - [x] I have added tests relevant to the introduced functionality, and the unit tests are passing locally (carried over from original local testing in ROCm/aiter#5708 — op-level and kernel-level tests passed on real gfx950 hardware) - [ ] I have added inline documentation - [ ] I have run clang-format on all changed files

Reverts #5708.
CK submodule pin
1f66d862231703a0f354e5771e58573139bb6efbis not on any upstream CK branch — it's based on two local commits (f2e40a78,1f66d862) stacked on top of the previous good pin (af9e1d1f), never submitted to CK'sdevelopbranch. This breaks CI's submodule sync since the commit isn't fetchable.Plan to re-land:
No change to the relu2 implementation itself is needed — this is purely a submodule-provenance/CI fix.