diff --git a/src/c_api/c_api.cu b/src/c_api/c_api.cu index d37ca5670..d4a2b7211 100644 --- a/src/c_api/c_api.cu +++ b/src/c_api/c_api.cu @@ -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}; diff --git a/src/common/common.h b/src/common/common.h index 8263283f3..220a61b28 100644 --- a/src/common/common.h +++ b/src/common/common.h @@ -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) }