Skip to content

Remove duplicated groups for EP and DP_EP#226

Open
gabrielecastellano wants to merge 1 commit intoaliyun:masterfrom
gabrielecastellano:patch-2
Open

Remove duplicated groups for EP and DP_EP#226
gabrielecastellano wants to merge 1 commit intoaliyun:masterfrom
gabrielecastellano:patch-2

Conversation

@gabrielecastellano
Copy link
Contributor

This addresses the problem described in #222, where the MockNcclGroup method unnecessarily creates _EP_size times the same EP groups (and _DP_EP_size times the same DP_EP groups).

This addresses the problem described in aliyun#222
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a redundancy issue in MockNcclGroup constructor where EP and DP_EP communication groups were being created multiple times with identical configurations due to unused loop variables. As described in issue #222, the inner j loops iterated _EP_size and _DP_EP_size times respectively, but the j variable was never used in the loop body, resulting in the same groups being created and overwritten repeatedly in the GroupIndex map.

Changes:

  • Removed the redundant inner for(int j = 0; j < _EP_size; j++) loop from EP group creation, reducing unnecessary duplicate group construction
  • Removed the redundant inner for(int j = 0; j < _DP_EP_size; j++) loop from DP_EP group creation
  • Added a trailing newline at the end of the file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

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