Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
wejoncy committed Sep 21, 2023
1 parent b2d941e commit 695b286
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions onnxruntime/contrib_ops/cuda/collective/nccl_kernels.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ int CreateSocket(bool is_server) {
int sockfd = -1;

struct addrinfo hints;
struct addrinfo *result = nullptr;
AddrInfoPtr result_ptr(result, [](struct addrinfo *p) { if(p){freeaddrinfo(p);} });
struct addrinfo* result = nullptr;
AddrInfoPtr result_ptr(result, [](struct addrinfo* p) { if(p){freeaddrinfo(p);} });

memset(&hints, 0, sizeof(struct addrinfo));
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
Expand Down Expand Up @@ -89,7 +89,7 @@ int CreateSocket(bool is_server) {
continue;
}

if (is_server){
if (is_server) {
if (bind(sockfd, rp->ai_addr, rp->ai_addrlen) == 0) {
FLLOG << "Listening on port " << port_number << " for the other GPU processores...\n";
} else {
Expand Down Expand Up @@ -149,7 +149,6 @@ int WriteOnRank0(ncclUniqueId* nccl_id, int word_size) {
return 0;
}


int ReadFromRank0(ncclUniqueId* nccl_id) {
int sockfd = CreateSocket(false);
if (sockfd < 0) {
Expand Down Expand Up @@ -179,7 +178,6 @@ int IPC_Bcast(ncclUniqueId* nccl_id, int rank, int world_size) {
}
} // namespace IPC


static Status CreateNcclCommunicator(int world_size, int rank, ncclComm_t* comm, bool is_launched_by_mpi) {
// Create new NCCL communicator
ncclUniqueId nccl_id;
Expand Down

0 comments on commit 695b286

Please sign in to comment.