Throw error when not compiled with NCCL. (#5170)
This commit is contained in:
parent
2d95b9a4b6
commit
2b9a62a806
@ -71,6 +71,10 @@ void AllReducer::Init(int _device_ordinal) {
|
|||||||
dh::safe_nccl(ncclCommInitRank(&comm, rabit::GetWorldSize(), id, rank));
|
dh::safe_nccl(ncclCommInitRank(&comm, rabit::GetWorldSize(), id, rank));
|
||||||
safe_cuda(cudaStreamCreate(&stream));
|
safe_cuda(cudaStreamCreate(&stream));
|
||||||
initialised_ = true;
|
initialised_ = true;
|
||||||
|
#else
|
||||||
|
if (rabit::IsDistributed()) {
|
||||||
|
LOG(FATAL) << "XGBoost is not compiled with NCCL.";
|
||||||
|
}
|
||||||
#endif // XGBOOST_USE_NCCL
|
#endif // XGBOOST_USE_NCCL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user