From ee582f03c36524eca691a0b1b0f1b2611fa6d061 Mon Sep 17 00:00:00 2001 From: amdsc21 <96135754+amdsc21@users.noreply.github.com> Date: Sat, 25 Mar 2023 23:35:57 +0100 Subject: [PATCH] rm device_helpers.hip.h from cuh --- src/collective/device_communicator.cuh | 4 ---- src/common/algorithm.cuh | 6 ------ src/common/cuda_context.cuh | 5 ----- src/common/hist_util.cuh | 6 ------ src/common/linalg_op.cuh | 5 ----- src/common/quantile.cuh | 6 ------ src/common/stats.cuh | 6 ------ src/common/threading_utils.cuh | 6 ------ src/data/device_adapter.cuh | 5 ----- src/data/ellpack_page.cuh | 6 ------ src/data/simple_dmatrix.cuh | 5 ----- src/tree/constraints.cuh | 5 ----- src/tree/gpu_hist/gradient_based_sampler.cuh | 5 ----- src/tree/gpu_hist/row_partitioner.cuh | 5 ----- src/tree/updater_gpu_common.cuh | 6 ------ 15 files changed, 81 deletions(-) diff --git a/src/collective/device_communicator.cuh b/src/collective/device_communicator.cuh index b10b86614..32d69e1b5 100644 --- a/src/collective/device_communicator.cuh +++ b/src/collective/device_communicator.cuh @@ -4,11 +4,7 @@ #pragma once #include -#if defined(XGBOOST_USE_HIP) -#include "../common/device_helpers.hip.h" -#elif defined(XGBOOST_USE_CUDA) #include "../common/device_helpers.cuh" -#endif namespace xgboost { namespace collective { diff --git a/src/common/algorithm.cuh b/src/common/algorithm.cuh index 1356b8e23..ecd61cf53 100644 --- a/src/common/algorithm.cuh +++ b/src/common/algorithm.cuh @@ -23,13 +23,7 @@ #include "common.h" // safe_cuda #include "cuda_context.cuh" // CUDAContext - -#if defined(XGBOOST_USE_HIP) -#include "device_helpers.hip.h" -#elif defined(XGBOOST_USE_CUDA) #include "device_helpers.cuh" // TemporaryArray,SegmentId,LaunchN,Iota,device_vector -#endif - #include "xgboost/base.h" // XGBOOST_DEVICE #include "xgboost/context.h" // Context #include "xgboost/logging.h" // CHECK diff --git a/src/common/cuda_context.cuh b/src/common/cuda_context.cuh index 47b51c009..f86fc07d5 100644 --- a/src/common/cuda_context.cuh +++ b/src/common/cuda_context.cuh @@ -4,12 +4,7 @@ #ifndef XGBOOST_COMMON_CUDA_CONTEXT_CUH_ #define XGBOOST_COMMON_CUDA_CONTEXT_CUH_ #include - -#if defined(XGBOOST_USE_HIP) -#include "device_helpers.hip.h" -#elif defined(XGBOOST_USE_CUDA) #include "device_helpers.cuh" -#endif namespace xgboost { struct CUDAContext { diff --git a/src/common/hist_util.cuh b/src/common/hist_util.cuh index a027d856f..dc956df8c 100644 --- a/src/common/hist_util.cuh +++ b/src/common/hist_util.cuh @@ -12,13 +12,7 @@ #include // for size_t #include "../data/device_adapter.cuh" - -#if defined(XGBOOST_USE_CUDA) #include "device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "device_helpers.hip.h" -#endif - #include "hist_util.h" #include "quantile.cuh" #include "timer.h" diff --git a/src/common/linalg_op.cuh b/src/common/linalg_op.cuh index fdd72df75..705745248 100644 --- a/src/common/linalg_op.cuh +++ b/src/common/linalg_op.cuh @@ -4,12 +4,7 @@ #ifndef XGBOOST_COMMON_LINALG_OP_CUH_ #define XGBOOST_COMMON_LINALG_OP_CUH_ -#if defined(XGBOOST_USE_CUDA) #include "device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "device_helpers.hip.h" -#endif - #include "linalg_op.h" #include "xgboost/context.h" #include "xgboost/linalg.h" diff --git a/src/common/quantile.cuh b/src/common/quantile.cuh index 520f9f778..de7f84dc4 100644 --- a/src/common/quantile.cuh +++ b/src/common/quantile.cuh @@ -5,13 +5,7 @@ #include "xgboost/span.h" #include "xgboost/data.h" - -#if defined(XGBOOST_USE_CUDA) #include "device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "device_helpers.hip.h" -#endif - #include "quantile.h" #include "timer.h" #include "categorical.h" diff --git a/src/common/stats.cuh b/src/common/stats.cuh index 6535ff630..16a22f877 100644 --- a/src/common/stats.cuh +++ b/src/common/stats.cuh @@ -19,13 +19,7 @@ #include "algorithm.cuh" // SegmentedArgMergeSort #include "cuda_context.cuh" // CUDAContext - -#if defined(XGBOOST_USE_CUDA) #include "device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "device_helpers.hip.h" -#endif - #include "xgboost/context.h" // Context #include "xgboost/span.h" // Span diff --git a/src/common/threading_utils.cuh b/src/common/threading_utils.cuh index 362de31e4..23fda9256 100644 --- a/src/common/threading_utils.cuh +++ b/src/common/threading_utils.cuh @@ -9,13 +9,7 @@ #include "./math.h" // Sqr #include "common.h" - -#if defined(XGBOOST_USE_HIP) -#include "device_helpers.hip.h" -#elif defined(XGBOOST_USE_CUDA) #include "device_helpers.cuh" // LaunchN -#endif - #include "xgboost/base.h" // XGBOOST_DEVICE #include "xgboost/span.h" // Span diff --git a/src/data/device_adapter.cuh b/src/data/device_adapter.cuh index 97b1e8874..d7d78de19 100644 --- a/src/data/device_adapter.cuh +++ b/src/data/device_adapter.cuh @@ -12,12 +12,7 @@ #include #include -#if defined(XGBOOST_USE_CUDA) #include "../common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../common/device_helpers.hip.h" -#endif - #include "../common/math.h" #include "adapter.h" #include "array_interface.h" diff --git a/src/data/ellpack_page.cuh b/src/data/ellpack_page.cuh index 807ee0ea6..faf44b3b6 100644 --- a/src/data/ellpack_page.cuh +++ b/src/data/ellpack_page.cuh @@ -8,13 +8,7 @@ #include #include "../common/compressed_iterator.h" - -#if defined(XGBOOST_USE_CUDA) #include "../common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../common/device_helpers.hip.h" -#endif - #include "../common/hist_util.h" #include "../common/categorical.h" #include diff --git a/src/data/simple_dmatrix.cuh b/src/data/simple_dmatrix.cuh index c72af07b6..73500b91c 100644 --- a/src/data/simple_dmatrix.cuh +++ b/src/data/simple_dmatrix.cuh @@ -9,12 +9,7 @@ #include #include -#if defined(XGBOOST_USE_CUDA) #include "../common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../common/device_helpers.hip.h" -#endif - #include "../common/error_msg.h" // for InfInData #include "device_adapter.cuh" // for HasInfInData diff --git a/src/tree/constraints.cuh b/src/tree/constraints.cuh index bb20c8cf8..94c262240 100644 --- a/src/tree/constraints.cuh +++ b/src/tree/constraints.cuh @@ -15,12 +15,7 @@ #include "constraints.h" #include "xgboost/span.h" #include "../common/bitfield.h" - -#if defined(XGBOOST_USE_CUDA) #include "../common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../common/device_helpers.hip.h" -#endif namespace xgboost { // Feature interaction constraints built for GPU Hist updater. diff --git a/src/tree/gpu_hist/gradient_based_sampler.cuh b/src/tree/gpu_hist/gradient_based_sampler.cuh index 925d4af2a..5be6c71de 100644 --- a/src/tree/gpu_hist/gradient_based_sampler.cuh +++ b/src/tree/gpu_hist/gradient_based_sampler.cuh @@ -6,12 +6,7 @@ #include #include -#if defined(XGBOOST_USE_CUDA) #include "../../common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../common/device_helpers.hip.h" -#endif - #include "../../data/ellpack_page.cuh" namespace xgboost { diff --git a/src/tree/gpu_hist/row_partitioner.cuh b/src/tree/gpu_hist/row_partitioner.cuh index 5732ad0fe..e41a3cc31 100644 --- a/src/tree/gpu_hist/row_partitioner.cuh +++ b/src/tree/gpu_hist/row_partitioner.cuh @@ -7,12 +7,7 @@ #include #include -#if defined(XGBOOST_USE_CUDA) #include "../../common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../common/device_helpers.hip.h" -#endif - #include "xgboost/base.h" #include "xgboost/context.h" #include "xgboost/task.h" diff --git a/src/tree/updater_gpu_common.cuh b/src/tree/updater_gpu_common.cuh index 8e15e90bb..44e5453e5 100644 --- a/src/tree/updater_gpu_common.cuh +++ b/src/tree/updater_gpu_common.cuh @@ -17,13 +17,7 @@ #include #include #include "../common/categorical.h" - -#if defined(XGBOOST_USE_CUDA) #include "../common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../common/device_helpers.hip.h" -#endif - #include "../common/random.h" #include "gpu_hist/histogram.cuh" #include "param.h"