Skip to content

Fix pipelined self-copy ranks#147

Merged
romerojosh merged 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/pipelined-self-copy-ranks
Jun 25, 2026
Merged

Fix pipelined self-copy ranks#147
romerojosh merged 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/pipelined-self-copy-ranks

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Treat the final pipelined pack self-copy as a self transfer for both source and destination ranks.

Validation

  • git diff --check

@romerojosh romerojosh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi again @fallintoplace,
So for this PR, it seems the addition here is to ensure that both dst_rank and src_rank are consistently self. To be clear, this is not fixing any observable bug in the code. In multi-rank paths, only dst_rank is used and in the single rank paths that use src_rank, getAlltoallPeerRanks only returns self. However, setting src_rank explicitly to comm_rank is useful hardening for any future edits that might use this value.

Please remove the added asserts and I will approve the PR. Thanks!

Comment thread include/internal/transpose.h Outdated
src_rank = comm_rank;
dst_rank = comm_rank;
}
assert(dst_rank >= 0 && dst_rank < static_cast<int>(splits_a.size()));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the added assert calls in this PR. They are asserting things that should already be true by construction and don't provide a lot of utility.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your attention @romerojosh.

I have amended the PR with DCO.

Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
@fallintoplace fallintoplace force-pushed the fix/pipelined-self-copy-ranks branch from 0ebfbbd to 8bd27fe Compare June 24, 2026 23:04
@romerojosh

Copy link
Copy Markdown
Collaborator

/build

@github-actions

Copy link
Copy Markdown

🚀 Build workflow triggered! View run

@github-actions

Copy link
Copy Markdown

✅ Build workflow passed! View run

@romerojosh romerojosh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the contribution.

@romerojosh romerojosh merged commit 3847837 into NVIDIA:main Jun 25, 2026
4 checks passed
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.

2 participants