Repository navigation
Conversation
Refactor CP-size-derived parameter computation in MambaContextParallel into a _set_cp_params() helper and add a set_context_parallel_group() method so the CP group (and derived nheads/d_inner/ngroups shard sizes) can be swapped at runtime. In MambaMixer.forward, when packed_seq_params.cp_group is set, select the CP group per batch before in_proj so dynamic-CP sequence packing works with Mamba layers. Split from NVIDIA#3791; original changes by @parthmannan. Co-authored-by: Parth Mannan <pmannan@nvidia.com> Signed-off-by: ilml <tolong@nvidia.com>
Contributor
Author
|
/ok to test adab00b |
This was referenced Sep 8, 2026
3 of 5 tasks
This branch was previously 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.
What does this PR do?
Lets Mamba layers follow dynamic context-parallel groups:
MambaContextParallelgainsset_context_parallel_group()(CP-size-derived params refactored into_set_cp_params()), andMambaMixer.forwardrebinds the CP group frompacked_seq_params.cp_groupbeforein_projwhen dynamic CP is active. Independently mergeable —PackedSeqParams.cp_groupalready exists on main.Series (split of #3791)
Split of #3791 ("Update Dynamic CP to support sequence packing, MXFP8 and Mamba") against current
main, tracked in the Dynamic Context Parallelism project. Original changes by @parthmannan in #3791; hunks already covered by main (via the merged sequence-packing series and hybrid-CP fixes) were dropped, and the rest re-implemented against main's current structure. All PRs targetmain; merge order:Contribution process