Skip to content

Commit

Permalink
Add ccl event wait to adapt to default oneCCL option
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuhong61 authored and zhuyuhua-v committed Apr 20, 2023
1 parent e9a1738 commit bbc8a7d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/gpu/dpcpp_ccl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::allreduce_(std::v
stream,
attr), stream.get_native());
});
ret_evt.wait();
return ret_evt;
},
c10d::OpType::ALLREDUCE);
Expand Down Expand Up @@ -470,6 +471,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::reduce_(std::vect
comm,
stream), stream.get_native());
});
ret_evt.wait();
return ret_evt;

},
Expand Down Expand Up @@ -520,6 +522,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::_reduce_scatter_b
comm,
stream), stream.get_native());
});
ret_evt.wait();
return ret_evt;

},
Expand Down Expand Up @@ -558,6 +561,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::broadcast_(std::v
stream,
attr), stream.get_native());
});
ret_evt.wait();
return ret_evt;
},
c10d::OpType::BROADCAST);
Expand Down Expand Up @@ -610,7 +614,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::allgather_(std::v
comm,
stream), stream.get_native());
});

ret_evt.wait();
return ret_evt;
},
c10d::OpType::ALLGATHER);
Expand Down Expand Up @@ -658,6 +662,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::_allgather_base_(
comm,
stream), stream.get_native());
});
ret_evt.wait();
return ret_evt;
},
c10d::OpType::_ALLGATHER_BASE);
Expand Down Expand Up @@ -752,7 +757,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::gather_(std::vect
}
}
}

ret_evt.wait();
return ret_evt;
},
c10d::OpType::GATHER);
Expand Down Expand Up @@ -803,7 +808,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::alltoall_base_(at
stream,
attr), stream.get_native());
});

ret_evt.wait();
return ret_evt;
},
c10d::OpType::ALLTOALL_BASE);
Expand Down Expand Up @@ -849,6 +854,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::alltoall_base_(at
stream,
attr), stream.get_native());
});
ret_evt.wait();
return ret_evt;
},
c10d::OpType::ALLTOALL_BASE);
Expand Down Expand Up @@ -931,6 +937,7 @@ c10::intrusive_ptr<ProcessGroupCCL::AsyncWorkCCL> XPUCCLStubs::alltoall_(std::ve
outputs[i].view({-1}).copy_(flatOutputSplits[i]);
}
}
ret_evt.wait();
return ret_evt;
},
c10d::OpType::ALLTOALL);
Expand Down

0 comments on commit bbc8a7d

Please sign in to comment.