rm hip_category from source

This commit is contained in:
Hui Liu 2023-10-30 16:34:49 -07:00
parent 02f5464fa6
commit 6df27eadc9
3 changed files with 1 additions and 8 deletions

View File

@ -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: "

View File

@ -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);
}

View File

@ -63,6 +63,7 @@ namespace thrust {
namespace thrust {
namespace cuda = thrust::hip;
#define cuda_category hip_category
}
namespace hipcub {