diff --git a/src/collective/coll.cu b/src/collective/coll.cu index 6741a09b5..314f0ece0 100644 --- a/src/collective/coll.cu +++ b/src/collective/coll.cu @@ -33,11 +33,7 @@ Result GetNCCLResult(ncclResult_t code) { if (code == ncclUnhandledCudaError) { // nccl usually preserves the last error so we can get more details. auto err = cudaPeekAtLastError(); -#if defined(XGBOOST_USE_NCCL) ss << " CUDA error: " << thrust::system_error(err, thrust::cuda_category()).what() << "\n"; -#elif defined(XGBOOST_USE_RCCL) - ss << " CUDA error: " << thrust::system_error(err, thrust::hip_category()).what() << "\n"; -#endif } else if (code == ncclSystemError) { ss << " This might be caused by a network configuration issue. Please consider specifying " "the network interface for NCCL via environment variables listed in its reference: " diff --git a/src/collective/comm.cuh b/src/collective/comm.cuh index 1439bafbb..8fedf7ab9 100644 --- a/src/collective/comm.cuh +++ b/src/collective/comm.cuh @@ -20,11 +20,7 @@ inline Result GetCUDAResult(cudaError rc) { if (rc == cudaSuccess) { return Success(); } -#if defined(XGBOOST_USE_NCCL) std::string msg = thrust::system_error(rc, thrust::cuda_category()).what(); -#elif defined(XGBOOST_USE_RCCL) - std::string msg = thrust::system_error(rc, thrust::hip_category()).what(); -#endif return Fail(msg); } diff --git a/src/common/cuda_to_hip.h b/src/common/cuda_to_hip.h index 08042750a..2f9a5b4d1 100644 --- a/src/common/cuda_to_hip.h +++ b/src/common/cuda_to_hip.h @@ -63,6 +63,7 @@ namespace thrust { namespace thrust { namespace cuda = thrust::hip; +#define cuda_category hip_category } namespace hipcub {