Repository navigation
Revert "refactor topk softplus bias and opt" - #3085
Merged
Merged
Conversation
This reverts commit 9cfbdc8.
Contributor
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
Contributor
There was a problem hiding this comment.
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_gatingAPI and its kernel implementation, reverting to dedicated topk paths. - Add a standalone HIP
topk_softplus_kernels.cuimplementation and update the JIT build config to compile it. - Simplify
op_tests/test_moe_topk_sigmoid.pyby 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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reverts #3067 as it will cause failure