[Copy to main] fix(ssm): handle alignment padding in GDN packed seq + CP - #4289
Closed
svcnvidia-nemo-ci wants to merge 1 commit into
Closed
[Copy to main] fix(ssm): handle alignment padding in GDN packed seq + CP#4289svcnvidia-nemo-ci wants to merge 1 commit into
svcnvidia-nemo-ci wants to merge 1 commit into
Conversation
Contributor
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
svcnvidia-nemo-ci
marked this pull request as draft
April 14, 2026 01:04
Contributor
|
This fix could be involved in #2645. Close this one. |
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.
🤖 This PR was auto-generated by Claude via the
/claude copycommand.Cherry-picked from #4230.
What does this PR do ?
Fix shape mismatch in GDN packed sequence + CP > 1 when alignment padding is present.
Summary
When
cu_seqlens_q_paddedis not provided, GDN falls back tocu_seqlens_q(actual token boundaries) for the per-sequence all-to-all unpack. Alignment padding tokens are lost, making the output shorter thanhidden_states, crashing at the residual connection.Fix: Extract cu_seqlens resolution into
_resolve_cu_seqlens():cu_seqlens_paddedavailable → use it (unchanged behavior)ValueErrorrequestingcu_seqlens_paddedTest results
Unit tests: 5/5 passed
(2× H100, CP=2):
cu_seqlens_padded→ auto-extend, output shape correctcu_seqlens_padded→ValueErrorraised correctlycu_seqlens_paddedset → standard path worksFixes #4194