This commit is contained in:
Hui Liu 2023-11-02 16:39:24 -07:00
parent 51efb7442e
commit c81731308c
2 changed files with 4 additions and 1 deletions

View File

@ -23,6 +23,7 @@ void XGBBuildInfoDevice(Json *p_info) {
#if defined(XGBOOST_USE_CUDA)
info["USE_CUDA"] = true;
#elif defined(XGBOOST_USE_HIP)
info["USE_CUDA"] = true;
info["USE_HIP"] = true;
#endif
@ -38,9 +39,11 @@ void XGBBuildInfoDevice(Json *p_info) {
v = {Json{Integer{NCCL_MAJOR}}, Json{Integer{NCCL_MINOR}}, Json{Integer{NCCL_PATCH}}};
info["NCCL_VERSION"] = v;
#elif defined(XGBOOST_USE_RCCL)
info["USE_NCCL"] = Boolean{true};
info["USE_RCCL"] = Boolean{true};
v = {Json{Integer{NCCL_MAJOR}}, Json{Integer{NCCL_MINOR}}, Json{Integer{NCCL_PATCH}}};
info["RCCL_VERSION"] = v;
info["NCCL_VERSION"] = v;
#else
info["USE_NCCL"] = Boolean{false};
info["USE_RCCL"] = Boolean{false};

View File

@ -171,7 +171,7 @@ inline void AssertGPUSupport() {
}
inline void AssertNCCLSupport() {
#if !defined(XGBOOST_USE_NCCL)
#if !defined(XGBOOST_USE_NCCL) && !defined(XGBOOST_USE_RCCL)
LOG(FATAL) << "XGBoost version not compiled with NCCL support.";
#endif // !defined(XGBOOST_USE_NCCL)
}