Repository navigation
fix(moe): align HybridEP capacity growth with kernel chunk sizes - #7913
Draft
jalbericiola wants to merge 1 commit into
Draft
jalbericiola wants to merge 1 commit into
jalbericiola wants to merge 1 commit into
Conversation
Signed-off-by: Jorge Albericio <jalbericiola@nvidia.com>
This branch has not been deployed
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.
Ragged batches can grow HybridEP's token reservation to a capacity that violates the installed dispatch/combine kernels' chunk alignment. Derive a common alignment from their configured chunk sizes and apply it to initial and grown reservations. Release unused Torch allocator cache before raw CUDA allocation growth so free cached memory is available to the external allocator.
The change affects reserved capacity, not actual token counts, routing probabilities or losses. It applies without shared-prefix execution. Add tests for initial/grown capacity, no-shrink behavior and invalid chunk sizes. Real dispatch/combine backward across a capacity boundary remains a required GPU qualification gate.
An issue is optional for this bounded bug fix. The GPU regression must verify the supported DeepEP version before merge.
Validation and review status
7 focused CPU helper checks pass for chunk alignment, invalid settings and no-shrink/growth behavior. CUDA cache release is mocked; this does not qualify real dispatch/combine or allocator behavior.
The adapted patch applies to the pinned current-main base and reproduces candidate file hashes exactly. This remains a draft pending the stated runtime/CI gates.
Final local checks
The native
tools/autoformat.shworkflow, Black, isort, pylint, Ruff andgit diff --checkpass against the final scoped files. The shallow-history merge base was verified before accepting these results. Mypy remains advisory and is not clean; dependency/type findings are recorded separately. Real GPU allocator and dispatch/combine qualification remains pending.Diff size
Incremental contribution: 74 added lines, including 38 added test lines (51.35%); 0 test lines removed. These are physical diff lines in test directories, including comments and blank lines, not test coverage.
Commits are cryptographically signed and locally verified. GitHub signing-key registration is pending, so GitHub may label the signature unverified.