Skip to content

Conversation

Chao1Han
Copy link
Contributor

No description provided.

@Copilot Copilot AI review requested due to automatic review settings September 22, 2025 05:25
Copy link
Contributor

@Copilot 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 separates communication initialization logic from the communication retrieval process by splitting the getXCCLComm method into two distinct functions.

  • Extracted communication lookup logic into a new getXCCLComm method that only retrieves existing communicators
  • Created a new initXCCLComm method that handles the initialization of new communicators
  • Updated call sites to first check for existing communicators before initializing new ones

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/xccl/ProcessGroupXCCL.hpp Added method declaration for new getXCCLComm overload and initXCCLComm method
src/xccl/ProcessGroupXCCL.cpp Implemented the separation of concerns by creating distinct lookup and initialization methods, updated call sites

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.


op_id_++;
auto comm = getXCCLComm(key, device, opType, p2pRank, isSendRecvSelf);
std::shared_ptr<xcclComm_t> comm = getXCCLComm(key);
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like no difference with previous code, then why to separate as two APIs/steps?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just for align nccl, To facilitate future feature integration, we can first align this part.

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.

4 participants