Skip to content

Revert "refactor topk softplus bias and opt" - #3085

Merged
valarLip merged 1 commit into
mainfrom
revert-3067-opt_topk_softplus_bias
May 8, 2026
Merged

valarLip merged 1 commit into
mainfrom
revert-3067-opt_topk_softplus_bias

Conversation

@yzhou103

@yzhou103 yzhou103 commented May 8, 2026

Copy link
Copy Markdown
Contributor

Reverts #3067 as it will cause failure

@yzhou103
yzhou103 requested review from a team and Copilot May 8, 2026 08:37
@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown
Contributor

🏷️ CI Guide

Runs automatically on every PR:

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

Extended tests (opt-in via labels):

Label Tests
ci:triton-300x Run an additional Triton test job on MI300X in PRs; main branch always runs both MI35X and MI300X
ci:sglang SGLang integration tests
ci:atom ATOM benchmark (DeepSeek-R1 + GPT-OSS)
ci:vllm vLLM benchmark
ci:all All of the above

Add labels via the sidebar or gh pr edit 3085 --add-label <label>

@valarLip
valarLip merged commit b1a5641 into main May 8, 2026
15 of 16 checks passed
@valarLip
valarLip deleted the revert-3067-opt_topk_softplus_bias branch May 8, 2026 08:39

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.

Pull request overview

This PR reverts the prior “refactor topk softplus bias and opt” change set (#3067) after it was found to cause failures, restoring a simpler/older topk_softplus implementation and trimming associated test/benchmark coverage.

Changes:

  • Remove the unified topk_gating API and its kernel implementation, reverting to dedicated topk paths.
  • Add a standalone HIP topk_softplus_kernels.cu implementation and update the JIT build config to compile it.
  • Simplify op_tests/test_moe_topk_sigmoid.py by removing softmax routing coverage and reducing parameter combinations.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
op_tests/test_moe_topk_sigmoid.py Removes softmax routing benchmark/tests and simplifies fused-path selection and CLI config generation.
csrc/kernels/topk_softplus_kernels.cu Reintroduces a standalone shared-memory topk sqrtsoftplus implementation.
csrc/kernels/topk_gating_kernels.cu Deleted (removes unified topk gating kernel supporting multiple score functions).
csrc/include/rocm_ops.hpp Updates pybind signature/docs for topk_softplus (removes score_func).
csrc/include/moe_op.h Updates C++ API for topk_softplus to remove score_func.
aiter/ops/topk.py Removes Python-level topk_gating wrapper and score_func plumbing.
aiter/jit/optCompilerConfig.json Switches compilation input from topk_gating_kernels.cu to topk_softplus_kernels.cu.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +127 to +128
topk_indice = threadIdx.x == k ? max_idx : topk_indice;
topk_value = threadIdx.x == k ? max_val : topk_value;
// Step 3: apply renorm and route_scale
if(need_renorm)
{
sum = routed_scaling_factor / sum;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants