Skip to content
This repository has been archived by the owner on May 17, 2022. It is now read-only.

Set to the correct device in ProcessGroupUCC::initComm #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/torch_ucc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -802,6 +802,11 @@ c10::intrusive_ptr<ProcessGroup> ProcessGroupUCC::createProcessGroupUCC(

void ProcessGroupUCC::initComm(c10::Device dev) {
if (!comm) {
#ifdef USE_CUDA
if (dev.is_cuda()) {
c10::cuda::set_device(dev.index());
}
#endif
comm = CommPG::get_comm(comm_id, dev, &oob);
comm->ucx_connect_eps(eps, &oob);
comm->ucc_create_team(team, &oob);
Expand Down