[coll] Add nccl. (#9726)

This commit is contained in:
Jiaming Yuan
2023-10-28 16:33:58 +08:00
committed by GitHub
parent 0c621094b3
commit 6755179e77
19 changed files with 924 additions and 111 deletions

View File

@@ -1169,7 +1169,13 @@ class CUDAStreamView {
operator cudaStream_t() const { // NOLINT
return stream_;
}
void Sync() { dh::safe_cuda(cudaStreamSynchronize(stream_)); }
cudaError_t Sync(bool error = true) {
if (error) {
dh::safe_cuda(cudaStreamSynchronize(stream_));
return cudaSuccess;
}
return cudaStreamSynchronize(stream_);
}
};
inline void CUDAEvent::Record(CUDAStreamView stream) { // NOLINT