compiler errors fix

This commit is contained in:
Hui Liu
2024-01-12 12:09:01 -08:00
parent 1e1e8be3a5
commit 9759e28e6a
10 changed files with 90 additions and 82 deletions

View File

@@ -1,15 +1,25 @@
/**
* Copyright 2023, XGBoost Contributors
*/
#if defined(XGBOOST_USE_NCCL) || (defined(XGBOOST_USE_RCCL) && 0)
#if defined(XGBOOST_USE_NCCL) || defined(XGBOOST_USE_RCCL)
#include "nccl_stub.h"
#if defined(XGBOOST_USE_NCCL)
#include <cuda.h> // for CUDA_VERSION
#include <cuda_runtime_api.h> // for cudaPeekAtLastError
#include <dlfcn.h> // for dlclose, dlsym, dlopen
#include <nccl.h>
#include <thrust/system/cuda/error.h> // for cuda_category
#include <thrust/system_error.h> // for system_error
#elif defined(XGBOOST_USE_RCCL)
#include "../common/cuda_to_hip.h"
#include "../common/device_helpers.hip.h"
#include <hip/hip_runtime_api.h> // for cudaPeekAtLastError
#include <dlfcn.h> // for dlclose, dlsym, dlopen
#include <rccl.h>
#include <thrust/system/hip/error.h> // for cuda_category
#include <thrust/system_error.h> // for system_error
#endif
#include <cstdint> // for int32_t
#include <sstream> // for stringstream

View File

@@ -2,10 +2,17 @@
* Copyright 2023, XGBoost Contributors
*/
#pragma once
#if defined(XGBOOST_USE_NCCL) || (defined(XGBOOST_USE_RCCL) && 0)
#if defined(XGBOOST_USE_NCCL) || defined(XGBOOST_USE_RCCL)
#if defined(XGBOOST_USE_NCCL)
#include <cuda_runtime_api.h>
#include <nccl.h>
#elif defined(XGBOOST_USE_RCCL)
#include "../common/cuda_to_hip.h"
#include "../common/device_helpers.cuh"
#include <hip/hip_runtime_api.h>
#include <rccl.h>
#endif
#include <string> // for string