From 82d81bca949e2e86b51150beae430a5b808a7dc1 Mon Sep 17 00:00:00 2001 From: Hui Liu <96135754+amdsc21@users.noreply.github.com> Date: Mon, 30 Oct 2023 21:54:00 -0700 Subject: [PATCH] rm hip.h files --- src/collective/communicator-inl.hip.h | 7 ------- src/collective/device_communicator.hip.h | 6 ------ src/collective/device_communicator_adapter.hip.h | 6 ------ src/collective/nccl_device_communicator.hip.h | 6 ------ src/common/algorithm.hip.h | 6 ------ src/common/cuda_context.hip.h | 6 ------ src/common/deterministic.hip.h | 6 ------ src/common/hist_util.hip.h | 9 --------- src/common/linalg_op.hip.h | 6 ------ src/common/quantile.hip.h | 3 --- src/common/ranking_utils.hip.h | 6 ------ src/common/stats.hip.h | 6 ------ src/common/threading_utils.hip.h | 6 ------ src/data/device_adapter.hip.h | 7 ------- src/data/ellpack_page.hip.h | 6 ------ src/data/proxy_dmatrix.hip.h | 6 ------ src/data/simple_dmatrix.hip.h | 7 ------- src/objective/lambdarank_obj.hip.h | 6 ------ src/tree/constraints.hip.h | 8 -------- src/tree/gpu_hist/evaluate_splits.hip.h | 6 ------ src/tree/gpu_hist/expand_entry.hip.h | 6 ------ src/tree/gpu_hist/feature_groups.hip.h | 7 ------- src/tree/gpu_hist/gradient_based_sampler.hip.h | 6 ------ src/tree/gpu_hist/histogram.hip.h | 6 ------ src/tree/gpu_hist/row_partitioner.hip.h | 6 ------ src/tree/updater_gpu_common.hip.h | 6 ------ tests/cpp/collective/test_nccl_device_communicator.cu | 5 ----- tests/cpp/common/test_algorithm.cu | 5 ----- tests/cpp/common/test_bitfield.cu | 4 ---- tests/cpp/common/test_device_helpers.cu | 4 ---- tests/cpp/common/test_gpu_compressed_iterator.cu | 4 ---- tests/cpp/common/test_hist_util.cu | 8 -------- tests/cpp/common/test_host_device_vector.cu | 5 ----- tests/cpp/common/test_linalg.cu | 4 ---- tests/cpp/common/test_quantile.cu | 8 -------- tests/cpp/common/test_ranking_utils.cu | 7 ------- tests/cpp/common/test_span.cu | 6 ------ tests/cpp/common/test_stats.cu | 5 ----- tests/cpp/common/test_threading_utils.cu | 5 ----- tests/cpp/data/test_array_interface.h | 4 ---- tests/cpp/data/test_device_adapter.cu | 5 ----- tests/cpp/data/test_ellpack_page.cu | 4 ---- tests/cpp/data/test_ellpack_page_raw_format.cu | 4 ---- tests/cpp/data/test_iterative_dmatrix.cu | 5 ----- tests/cpp/data/test_metainfo.cu | 4 ---- tests/cpp/data/test_proxy_dmatrix.cu | 4 ---- tests/cpp/data/test_simple_dmatrix.cu | 4 ---- tests/cpp/data/test_sparse_page_dmatrix.cu | 4 ---- tests/cpp/helpers.cu | 4 ---- tests/cpp/objective/test_lambdarank_obj.cu | 5 ----- tests/cpp/predictor/test_gpu_predictor.cu | 4 ---- tests/cpp/tree/gpu_hist/test_driver.cu | 4 ---- tests/cpp/tree/gpu_hist/test_evaluate_splits.cu | 4 ---- tests/cpp/tree/gpu_hist/test_gradient_based_sampler.cu | 5 ----- tests/cpp/tree/gpu_hist/test_histogram.cu | 5 ----- tests/cpp/tree/gpu_hist/test_row_partitioner.cu | 4 ---- tests/cpp/tree/test_constraints.cu | 6 ------ tests/cpp/tree/test_gpu_hist.cu | 7 ------- 58 files changed, 318 deletions(-) delete mode 100644 src/collective/communicator-inl.hip.h delete mode 100644 src/collective/device_communicator.hip.h delete mode 100644 src/collective/device_communicator_adapter.hip.h delete mode 100644 src/collective/nccl_device_communicator.hip.h delete mode 100644 src/common/algorithm.hip.h delete mode 100644 src/common/cuda_context.hip.h delete mode 100644 src/common/deterministic.hip.h delete mode 100644 src/common/hist_util.hip.h delete mode 100644 src/common/linalg_op.hip.h delete mode 100644 src/common/quantile.hip.h delete mode 100644 src/common/ranking_utils.hip.h delete mode 100644 src/common/stats.hip.h delete mode 100644 src/common/threading_utils.hip.h delete mode 100644 src/data/device_adapter.hip.h delete mode 100644 src/data/ellpack_page.hip.h delete mode 100644 src/data/proxy_dmatrix.hip.h delete mode 100644 src/data/simple_dmatrix.hip.h delete mode 100644 src/objective/lambdarank_obj.hip.h delete mode 100644 src/tree/constraints.hip.h delete mode 100644 src/tree/gpu_hist/evaluate_splits.hip.h delete mode 100644 src/tree/gpu_hist/expand_entry.hip.h delete mode 100644 src/tree/gpu_hist/feature_groups.hip.h delete mode 100644 src/tree/gpu_hist/gradient_based_sampler.hip.h delete mode 100644 src/tree/gpu_hist/histogram.hip.h delete mode 100644 src/tree/gpu_hist/row_partitioner.hip.h delete mode 100644 src/tree/updater_gpu_common.hip.h diff --git a/src/collective/communicator-inl.hip.h b/src/collective/communicator-inl.hip.h deleted file mode 100644 index 4b92e794f..000000000 --- a/src/collective/communicator-inl.hip.h +++ /dev/null @@ -1,7 +0,0 @@ - -/*! - * Copyright 2022 XGBoost contributors - */ -#pragma once - -#include "communicator-inl.cuh" diff --git a/src/collective/device_communicator.hip.h b/src/collective/device_communicator.hip.h deleted file mode 100644 index 6c4473a43..000000000 --- a/src/collective/device_communicator.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2022 XGBoost contributors - */ -#pragma once - -#include "device_communicator.cuh" diff --git a/src/collective/device_communicator_adapter.hip.h b/src/collective/device_communicator_adapter.hip.h deleted file mode 100644 index f7cff5b4b..000000000 --- a/src/collective/device_communicator_adapter.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2022 XGBoost contributors - */ -#pragma once - -#include "device_communicator_adapter.cuh" diff --git a/src/collective/nccl_device_communicator.hip.h b/src/collective/nccl_device_communicator.hip.h deleted file mode 100644 index 0b42ef9a8..000000000 --- a/src/collective/nccl_device_communicator.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2022 XGBoost contributors - */ -#pragma once - -#include "nccl_device_communicator.cuh" diff --git a/src/common/algorithm.hip.h b/src/common/algorithm.hip.h deleted file mode 100644 index 98d660c20..000000000 --- a/src/common/algorithm.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2022-2023 by XGBoost Contributors - */ -#pragma once - -#include "algorithm.cuh" // Span,byte diff --git a/src/common/cuda_context.hip.h b/src/common/cuda_context.hip.h deleted file mode 100644 index 2ab5d8da0..000000000 --- a/src/common/cuda_context.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2022 by XGBoost Contributors - */ -#pragma once - -#include "cuda_context.cuh" diff --git a/src/common/deterministic.hip.h b/src/common/deterministic.hip.h deleted file mode 100644 index 57d55ff12..000000000 --- a/src/common/deterministic.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2020-2023 by XGBoost Contributors - */ -#pragma once - -#include "deterministic.cuh" // XGBOOST_DEVICE diff --git a/src/common/hist_util.hip.h b/src/common/hist_util.hip.h deleted file mode 100644 index 7a4f05fca..000000000 --- a/src/common/hist_util.hip.h +++ /dev/null @@ -1,9 +0,0 @@ -/** - * Copyright 2020-2023 by XGBoost contributors - * - * \brief Front end and utilities for GPU based sketching. Works on sliding window - * instead of stream. - */ -#pragma once - -#include "hist_util.cuh" diff --git a/src/common/linalg_op.hip.h b/src/common/linalg_op.hip.h deleted file mode 100644 index 16757874c..000000000 --- a/src/common/linalg_op.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2021-2022 by XGBoost Contributors - */ -#pragma once - -#include "linalg_op.cuh" diff --git a/src/common/quantile.hip.h b/src/common/quantile.hip.h deleted file mode 100644 index 59cc615a4..000000000 --- a/src/common/quantile.hip.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -#include "quantile.cuh" diff --git a/src/common/ranking_utils.hip.h b/src/common/ranking_utils.hip.h deleted file mode 100644 index 52bd59faf..000000000 --- a/src/common/ranking_utils.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2023 by XGBoost Contributors - */ -#pragma once - -#include "ranking_utils.cuh" // for Span diff --git a/src/common/stats.hip.h b/src/common/stats.hip.h deleted file mode 100644 index c5f646ebc..000000000 --- a/src/common/stats.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2022-2023 by XGBoost Contributors - */ -#pragma once - -#include "stats.cuh" // Span diff --git a/src/common/threading_utils.hip.h b/src/common/threading_utils.hip.h deleted file mode 100644 index f57f1d116..000000000 --- a/src/common/threading_utils.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2021-2023 by XGBoost Contributors - */ -#pragma once - -#include "threading_utils.cuh" // Span diff --git a/src/data/device_adapter.hip.h b/src/data/device_adapter.hip.h deleted file mode 100644 index 98ab457fd..000000000 --- a/src/data/device_adapter.hip.h +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Copyright 2019-2023 by XGBoost Contributors - * \file device_adapter.cuh - */ -#pragma once - -#include "device_adapter.cuh" diff --git a/src/data/ellpack_page.hip.h b/src/data/ellpack_page.hip.h deleted file mode 100644 index a824b459a..000000000 --- a/src/data/ellpack_page.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2019 by XGBoost Contributors - */ -#pragma once - -#include "ellpack_page.cuh" diff --git a/src/data/proxy_dmatrix.hip.h b/src/data/proxy_dmatrix.hip.h deleted file mode 100644 index 020129eda..000000000 --- a/src/data/proxy_dmatrix.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2021-2023 XGBoost contributors - */ -#pragma once - -#include "proxy_dmatrix.cuh" diff --git a/src/data/simple_dmatrix.hip.h b/src/data/simple_dmatrix.hip.h deleted file mode 100644 index 5bbc1999b..000000000 --- a/src/data/simple_dmatrix.hip.h +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Copyright 2019-2023 by XGBoost Contributors - * \file simple_dmatrix.cuh - */ -#pragma once - -#include "simple_dmatrix.cuh" // for HasInfInData diff --git a/src/objective/lambdarank_obj.hip.h b/src/objective/lambdarank_obj.hip.h deleted file mode 100644 index 4242a1f0f..000000000 --- a/src/objective/lambdarank_obj.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Copyright 2023 XGBoost contributors - */ -#pragma once - -#include "lambdarank_obj.cuh" // for Span diff --git a/src/tree/constraints.hip.h b/src/tree/constraints.hip.h deleted file mode 100644 index 09d4b275f..000000000 --- a/src/tree/constraints.hip.h +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * Copyright 2019 XGBoost contributors - * - * \file Various constraints used in GPU_Hist. - */ -#pragma once - -#include "constraints.cuh" diff --git a/src/tree/gpu_hist/evaluate_splits.hip.h b/src/tree/gpu_hist/evaluate_splits.hip.h deleted file mode 100644 index cf98499c2..000000000 --- a/src/tree/gpu_hist/evaluate_splits.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2020 by XGBoost Contributors - */ -#pragma once - -#include "evaluate_splits.cuh" diff --git a/src/tree/gpu_hist/expand_entry.hip.h b/src/tree/gpu_hist/expand_entry.hip.h deleted file mode 100644 index 3d2d523e2..000000000 --- a/src/tree/gpu_hist/expand_entry.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2020 by XGBoost Contributors - */ -#pragma once - -#include "expand_entry.cuh" diff --git a/src/tree/gpu_hist/feature_groups.hip.h b/src/tree/gpu_hist/feature_groups.hip.h deleted file mode 100644 index cb90a3fa3..000000000 --- a/src/tree/gpu_hist/feature_groups.hip.h +++ /dev/null @@ -1,7 +0,0 @@ -/*! - * Copyright 2020 by XGBoost Contributors - */ - -#pragma once - -#include "feature_groups.cuh" diff --git a/src/tree/gpu_hist/gradient_based_sampler.hip.h b/src/tree/gpu_hist/gradient_based_sampler.hip.h deleted file mode 100644 index 2a70d886f..000000000 --- a/src/tree/gpu_hist/gradient_based_sampler.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2019 by XGBoost Contributors - */ -#pragma once - -#include "gradient_based_sampler.cuh" diff --git a/src/tree/gpu_hist/histogram.hip.h b/src/tree/gpu_hist/histogram.hip.h deleted file mode 100644 index 1d00ef464..000000000 --- a/src/tree/gpu_hist/histogram.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2020-2021 by XGBoost Contributors - */ -#pragma once - -#include "histogram.cuh" diff --git a/src/tree/gpu_hist/row_partitioner.hip.h b/src/tree/gpu_hist/row_partitioner.hip.h deleted file mode 100644 index 46d3415aa..000000000 --- a/src/tree/gpu_hist/row_partitioner.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2017-2022 XGBoost contributors - */ -#pragma once - -#include "row_partitioner.cuh" diff --git a/src/tree/updater_gpu_common.hip.h b/src/tree/updater_gpu_common.hip.h deleted file mode 100644 index 46d8eabd7..000000000 --- a/src/tree/updater_gpu_common.hip.h +++ /dev/null @@ -1,6 +0,0 @@ -/*! - * Copyright 2017-2019 XGBoost contributors - */ -#pragma once - -#include "updater_gpu_common.cuh" diff --git a/tests/cpp/collective/test_nccl_device_communicator.cu b/tests/cpp/collective/test_nccl_device_communicator.cu index 0f8b1904b..6f924a62f 100644 --- a/tests/cpp/collective/test_nccl_device_communicator.cu +++ b/tests/cpp/collective/test_nccl_device_communicator.cu @@ -8,13 +8,8 @@ #include #include // for string -#if defined(XGBOOST_USE_NCCL) #include "../../../src/collective/nccl_device_communicator.cuh" #include "../../../src/collective/communicator-inl.cuh" -#elif defined(XGBOOST_USE_RCCL) -#include "../../../src/collective/nccl_device_communicator.hip.h" -#include "../../../src/collective/communicator-inl.hip.h" -#endif #include "../helpers.h" namespace xgboost { diff --git a/tests/cpp/common/test_algorithm.cu b/tests/cpp/common/test_algorithm.cu index 793fae200..2cd2a340c 100644 --- a/tests/cpp/common/test_algorithm.cu +++ b/tests/cpp/common/test_algorithm.cu @@ -9,13 +9,8 @@ #include // is_sorted #include // size_t -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/algorithm.cuh" #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/algorithm.hip.h" -#include "../../../src/common/device_helpers.hip.h" -#endif #include "../helpers.h" // CreateEmptyGenericParam namespace xgboost { diff --git a/tests/cpp/common/test_bitfield.cu b/tests/cpp/common/test_bitfield.cu index e3158ee86..a9b183c43 100644 --- a/tests/cpp/common/test_bitfield.cu +++ b/tests/cpp/common/test_bitfield.cu @@ -6,11 +6,7 @@ #include #include #include "../../../src/common/bitfield.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#endif namespace xgboost { diff --git a/tests/cpp/common/test_device_helpers.cu b/tests/cpp/common/test_device_helpers.cu index 6a8122e1f..7f6bd92d7 100644 --- a/tests/cpp/common/test_device_helpers.cu +++ b/tests/cpp/common/test_device_helpers.cu @@ -6,11 +6,7 @@ #include #include #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#endif #include "../../../src/common/quantile.h" #include "../helpers.h" #include "gtest/gtest.h" diff --git a/tests/cpp/common/test_gpu_compressed_iterator.cu b/tests/cpp/common/test_gpu_compressed_iterator.cu index b56f2c862..779202a62 100644 --- a/tests/cpp/common/test_gpu_compressed_iterator.cu +++ b/tests/cpp/common/test_gpu_compressed_iterator.cu @@ -1,9 +1,5 @@ #include "../../../src/common/compressed_iterator.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#endif #include "gtest/gtest.h" #include #include diff --git a/tests/cpp/common/test_hist_util.cu b/tests/cpp/common/test_hist_util.cu index 7a28c36e3..bc15e9d63 100644 --- a/tests/cpp/common/test_hist_util.cu +++ b/tests/cpp/common/test_hist_util.cu @@ -16,18 +16,10 @@ #include // for vector #include "../../../include/xgboost/logging.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" #include "../../../src/common/hist_util.cuh" #include "../../../src/common/hist_util.h" #include "../../../src/data/device_adapter.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#include "../../../src/common/hist_util.hip.h" -#include "../../../src/common/hist_util.h" -#include "../../../src/common/math.h" -#include "../../../src/data/device_adapter.hip.h" -#endif #include "../../../src/data/simple_dmatrix.h" #include "../data/test_array_interface.h" #include "../filesystem.h" // dmlc::TemporaryDirectory diff --git a/tests/cpp/common/test_host_device_vector.cu b/tests/cpp/common/test_host_device_vector.cu index fa0f1d8bf..fe6130b64 100644 --- a/tests/cpp/common/test_host_device_vector.cu +++ b/tests/cpp/common/test_host_device_vector.cu @@ -5,12 +5,7 @@ #include #include #include - -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#endif #include namespace xgboost { diff --git a/tests/cpp/common/test_linalg.cu b/tests/cpp/common/test_linalg.cu index 8ca743cfe..be89d51bc 100644 --- a/tests/cpp/common/test_linalg.cu +++ b/tests/cpp/common/test_linalg.cu @@ -3,11 +3,7 @@ */ #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/linalg_op.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/linalg_op.hip.h" -#endif #include "../helpers.h" #include "xgboost/context.h" #include "xgboost/linalg.h" diff --git a/tests/cpp/common/test_quantile.cu b/tests/cpp/common/test_quantile.cu index dc800e866..06bf77eae 100644 --- a/tests/cpp/common/test_quantile.cu +++ b/tests/cpp/common/test_quantile.cu @@ -2,18 +2,10 @@ * Copyright 2020-2023, XGBoost contributors */ #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/collective/communicator-inl.cuh" #include "../../../src/common/hist_util.cuh" #include "../../../src/common/quantile.cuh" #include "../../../src/data/device_adapter.cuh" // CupyAdapter -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/collective/communicator-inl.hip.h" -#include "../../../src/common/hist_util.hip.h" -#include "../../../src/common/quantile.hip.h" -#include "../../../src/data/device_adapter.hip.h" // CupyAdapter -#endif - #include "../helpers.h" #include "test_quantile.h" diff --git a/tests/cpp/common/test_ranking_utils.cu b/tests/cpp/common/test_ranking_utils.cu index 08b7d549e..d62f5f171 100644 --- a/tests/cpp/common/test_ranking_utils.cu +++ b/tests/cpp/common/test_ranking_utils.cu @@ -11,17 +11,10 @@ #include // for iota #include // for vector -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/algorithm.cuh" // for SegmentedSequence #include "../../../src/common/cuda_context.cuh" // for CUDAContext #include "../../../src/common/device_helpers.cuh" // for device_vector, ToSpan #include "../../../src/common/ranking_utils.cuh" // for CalcQueriesInvIDCG -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/algorithm.hip.h" // for SegmentedSequence -#include "../../../src/common/cuda_context.hip.h" // for CUDAContext -#include "../../../src/common/device_helpers.hip.h" // for device_vector, ToSpan -#include "../../../src/common/ranking_utils.hip.h" // for CalcQueriesInvIDCG -#endif #include "../../../src/common/ranking_utils.h" // for LambdaRankParam, RankingCache #include "../helpers.h" // for EmptyDMatrix #include "test_ranking_utils.h" // for TestNDCGCache diff --git a/tests/cpp/common/test_span.cu b/tests/cpp/common/test_span.cu index c566225bd..9dea40bf1 100644 --- a/tests/cpp/common/test_span.cu +++ b/tests/cpp/common/test_span.cu @@ -6,13 +6,7 @@ #include #include #include - -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#endif - #include #include "test_span.h" diff --git a/tests/cpp/common/test_stats.cu b/tests/cpp/common/test_stats.cu index 2f5e4425a..c4a9e6fac 100644 --- a/tests/cpp/common/test_stats.cu +++ b/tests/cpp/common/test_stats.cu @@ -7,13 +7,8 @@ #include // std::pair #include // std::vector -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/linalg_op.cuh" // ElementWiseTransformDevice #include "../../../src/common/stats.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/linalg_op.hip.h" // ElementWiseTransformDevice -#include "../../../src/common/stats.hip.h" -#endif #include "../helpers.h" #include "xgboost/base.h" // XGBOOST_DEVICE #include "xgboost/context.h" // Context diff --git a/tests/cpp/common/test_threading_utils.cu b/tests/cpp/common/test_threading_utils.cu index 78a902fc6..f7160b1b5 100644 --- a/tests/cpp/common/test_threading_utils.cu +++ b/tests/cpp/common/test_threading_utils.cu @@ -4,13 +4,8 @@ #include #include // thrust::copy -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" #include "../../../src/common/threading_utils.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#include "../../../src/common/threading_utils.hip.h" -#endif namespace xgboost { namespace common { diff --git a/tests/cpp/data/test_array_interface.h b/tests/cpp/data/test_array_interface.h index a4780a5a9..78bce76f5 100644 --- a/tests/cpp/data/test_array_interface.h +++ b/tests/cpp/data/test_array_interface.h @@ -6,11 +6,7 @@ #include #include "../../../src/common/bitfield.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#endif namespace xgboost { diff --git a/tests/cpp/data/test_device_adapter.cu b/tests/cpp/data/test_device_adapter.cu index 392dc52f7..5b428318a 100644 --- a/tests/cpp/data/test_device_adapter.cu +++ b/tests/cpp/data/test_device_adapter.cu @@ -6,12 +6,7 @@ #include "../../../src/common/timer.h" #include "../helpers.h" #include - -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/device_adapter.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/device_adapter.hip.h" -#endif #include "test_array_interface.h" using namespace xgboost; // NOLINT diff --git a/tests/cpp/data/test_ellpack_page.cu b/tests/cpp/data/test_ellpack_page.cu index 40c2627a8..4b279a1a4 100644 --- a/tests/cpp/data/test_ellpack_page.cu +++ b/tests/cpp/data/test_ellpack_page.cu @@ -7,11 +7,7 @@ #include "../../../src/common/categorical.h" #include "../../../src/common/hist_util.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/ellpack_page.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/ellpack_page.hip.h" -#endif #include "../../../src/data/ellpack_page.h" #include "../../../src/tree/param.h" // TrainParam #include "../helpers.h" diff --git a/tests/cpp/data/test_ellpack_page_raw_format.cu b/tests/cpp/data/test_ellpack_page_raw_format.cu index eb9b5ac0b..f69b7b63a 100644 --- a/tests/cpp/data/test_ellpack_page_raw_format.cu +++ b/tests/cpp/data/test_ellpack_page_raw_format.cu @@ -5,11 +5,7 @@ #include #include "../../../src/common/io.h" // for PrivateMmapConstStream, AlignedResourceReadStream... -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/ellpack_page.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/ellpack_page.hip.h" -#endif #include "../../../src/data/sparse_page_source.h" #include "../../../src/tree/param.h" // TrainParam #include "../filesystem.h" // dmlc::TemporaryDirectory diff --git a/tests/cpp/data/test_iterative_dmatrix.cu b/tests/cpp/data/test_iterative_dmatrix.cu index da71f9677..6b856f3fa 100644 --- a/tests/cpp/data/test_iterative_dmatrix.cu +++ b/tests/cpp/data/test_iterative_dmatrix.cu @@ -3,13 +3,8 @@ */ #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/device_adapter.cuh" #include "../../../src/data/ellpack_page.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/device_adapter.hip.h" -#include "../../../src/data/ellpack_page.hip.h" -#endif #include "../../../src/data/ellpack_page.h" #include "../../../src/data/iterative_dmatrix.h" #include "../../../src/tree/param.h" // TrainParam diff --git a/tests/cpp/data/test_metainfo.cu b/tests/cpp/data/test_metainfo.cu index 67394a5ed..350ae012d 100644 --- a/tests/cpp/data/test_metainfo.cu +++ b/tests/cpp/data/test_metainfo.cu @@ -6,11 +6,7 @@ #include #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/device_helpers.hip.h" -#endif #include "test_array_interface.h" #include "test_metainfo.h" diff --git a/tests/cpp/data/test_proxy_dmatrix.cu b/tests/cpp/data/test_proxy_dmatrix.cu index cfbe731ec..ab38f51bb 100644 --- a/tests/cpp/data/test_proxy_dmatrix.cu +++ b/tests/cpp/data/test_proxy_dmatrix.cu @@ -7,11 +7,7 @@ #include // for any_cast #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/device_adapter.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/device_adapter.hip.h" -#endif #include "../../../src/data/proxy_dmatrix.h" #include "../helpers.h" diff --git a/tests/cpp/data/test_simple_dmatrix.cu b/tests/cpp/data/test_simple_dmatrix.cu index 321cc9e2f..dc273eac1 100644 --- a/tests/cpp/data/test_simple_dmatrix.cu +++ b/tests/cpp/data/test_simple_dmatrix.cu @@ -4,11 +4,7 @@ #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/device_adapter.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/device_adapter.hip.h" -#endif #include "../helpers.h" #include "test_array_interface.h" #include "../../../src/data/array_interface.h" diff --git a/tests/cpp/data/test_sparse_page_dmatrix.cu b/tests/cpp/data/test_sparse_page_dmatrix.cu index 306cb79ca..17ed64c90 100644 --- a/tests/cpp/data/test_sparse_page_dmatrix.cu +++ b/tests/cpp/data/test_sparse_page_dmatrix.cu @@ -4,11 +4,7 @@ #include // for DMatrix #include "../../../src/common/compressed_iterator.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/ellpack_page.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/ellpack_page.hip.h" -#endif #include "../../../src/data/ellpack_page.h" #include "../../../src/data/sparse_page_dmatrix.h" #include "../../../src/tree/param.h" // TrainParam diff --git a/tests/cpp/helpers.cu b/tests/cpp/helpers.cu index 7885c6def..10b800fc1 100644 --- a/tests/cpp/helpers.cu +++ b/tests/cpp/helpers.cu @@ -1,11 +1,7 @@ #include #include "helpers.h" -#if defined(XGBOOST_USE_CUDA) #include "../../src/data/device_adapter.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../src/data/device_adapter.hip.h" -#endif #include "../../src/data/iterative_dmatrix.h" namespace xgboost { diff --git a/tests/cpp/objective/test_lambdarank_obj.cu b/tests/cpp/objective/test_lambdarank_obj.cu index 641baf8f2..16dc45307 100644 --- a/tests/cpp/objective/test_lambdarank_obj.cu +++ b/tests/cpp/objective/test_lambdarank_obj.cu @@ -7,13 +7,8 @@ #include // for uint32_t #include // for vector -#if defined(XGBOOST_USE_CUDA) #include "../../../src/common/cuda_context.cuh" // for CUDAContext #include "../../../src/objective/lambdarank_obj.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/common/cuda_context.hip.h" // for CUDAContext -#include "../../../src/objective/lambdarank_obj.hip.h" -#endif #include "test_lambdarank_obj.h" namespace xgboost::obj { diff --git a/tests/cpp/predictor/test_gpu_predictor.cu b/tests/cpp/predictor/test_gpu_predictor.cu index ae66ae689..3a65e3e06 100644 --- a/tests/cpp/predictor/test_gpu_predictor.cu +++ b/tests/cpp/predictor/test_gpu_predictor.cu @@ -9,11 +9,7 @@ #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/device_adapter.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/device_adapter.hip.h" -#endif #include "../../../src/data/proxy_dmatrix.h" #include "../../../src/gbm/gbtree_model.h" #include "../helpers.h" diff --git a/tests/cpp/tree/gpu_hist/test_driver.cu b/tests/cpp/tree/gpu_hist/test_driver.cu index 2c5109c1a..106004c63 100644 --- a/tests/cpp/tree/gpu_hist/test_driver.cu +++ b/tests/cpp/tree/gpu_hist/test_driver.cu @@ -1,10 +1,6 @@ #include #include "../../../../src/tree/driver.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../../src/tree/gpu_hist/expand_entry.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../../src/tree/gpu_hist/expand_entry.hip.h" -#endif namespace xgboost { namespace tree { diff --git a/tests/cpp/tree/gpu_hist/test_evaluate_splits.cu b/tests/cpp/tree/gpu_hist/test_evaluate_splits.cu index de79e69c2..cb2f7d604 100644 --- a/tests/cpp/tree/gpu_hist/test_evaluate_splits.cu +++ b/tests/cpp/tree/gpu_hist/test_evaluate_splits.cu @@ -3,11 +3,7 @@ */ #include -#if defined(XGBOOST_USE_CUDA) #include "../../../../src/tree/gpu_hist/evaluate_splits.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../../src/tree/gpu_hist/evaluate_splits.hip.h" -#endif #include "../../helpers.h" #include "../../histogram_helpers.h" #include "../test_evaluate_splits.h" // TestPartitionBasedSplit diff --git a/tests/cpp/tree/gpu_hist/test_gradient_based_sampler.cu b/tests/cpp/tree/gpu_hist/test_gradient_based_sampler.cu index 0f31339a3..a290f31ed 100644 --- a/tests/cpp/tree/gpu_hist/test_gradient_based_sampler.cu +++ b/tests/cpp/tree/gpu_hist/test_gradient_based_sampler.cu @@ -3,13 +3,8 @@ */ #include -#if defined(XGBOOST_USE_CUDA) #include "../../../../src/data/ellpack_page.cuh" #include "../../../../src/tree/gpu_hist/gradient_based_sampler.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../../src/data/ellpack_page.hip.h" -#include "../../../../src/tree/gpu_hist/gradient_based_sampler.hip.h" -#endif #include "../../../../src/tree/param.h" // TrainParam #include "../../filesystem.h" // dmlc::TemporaryDirectory #include "../../helpers.h" diff --git a/tests/cpp/tree/gpu_hist/test_histogram.cu b/tests/cpp/tree/gpu_hist/test_histogram.cu index e24baa8c8..024a1e8d3 100644 --- a/tests/cpp/tree/gpu_hist/test_histogram.cu +++ b/tests/cpp/tree/gpu_hist/test_histogram.cu @@ -6,13 +6,8 @@ #include #include "../../../../src/common/categorical.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../../src/tree/gpu_hist/histogram.cuh" #include "../../../../src/tree/gpu_hist/row_partitioner.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../../src/tree/gpu_hist/histogram.hip.h" -#include "../../../../src/tree/gpu_hist/row_partitioner.hip.h" -#endif #include "../../../../src/tree/param.h" // TrainParam #include "../../categorical_helpers.h" #include "../../helpers.h" diff --git a/tests/cpp/tree/gpu_hist/test_row_partitioner.cu b/tests/cpp/tree/gpu_hist/test_row_partitioner.cu index fa4318415..0c1db9877 100644 --- a/tests/cpp/tree/gpu_hist/test_row_partitioner.cu +++ b/tests/cpp/tree/gpu_hist/test_row_partitioner.cu @@ -9,11 +9,7 @@ #include #include -#if defined(XGBOOST_USE_CUDA) #include "../../../../src/tree/gpu_hist/row_partitioner.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../../src/tree/gpu_hist/row_partitioner.hip.h" -#endif #include "../../helpers.h" #include "xgboost/base.h" #include "xgboost/context.h" diff --git a/tests/cpp/tree/test_constraints.cu b/tests/cpp/tree/test_constraints.cu index 6fafac56c..09e72a1d2 100644 --- a/tests/cpp/tree/test_constraints.cu +++ b/tests/cpp/tree/test_constraints.cu @@ -8,15 +8,9 @@ #include #include #include -#if defined(XGBOOST_USE_CUDA) #include "../../../src/tree/constraints.cuh" #include "../../../src/tree/param.h" #include "../../../src/common/device_helpers.cuh" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/tree/constraints.hip.h" -#include "../../../src/tree/param.h" -#include "../../../src/common/device_helpers.hip.h" -#endif namespace xgboost { namespace { diff --git a/tests/cpp/tree/test_gpu_hist.cu b/tests/cpp/tree/test_gpu_hist.cu index 927d78919..6b3d0fdd8 100644 --- a/tests/cpp/tree/test_gpu_hist.cu +++ b/tests/cpp/tree/test_gpu_hist.cu @@ -11,17 +11,10 @@ #include #include "../../../src/common/common.h" -#if defined(XGBOOST_USE_CUDA) #include "../../../src/data/ellpack_page.cuh" // for EllpackPageImpl #include "../../../src/data/ellpack_page.h" // for EllpackPage #include "../../../src/tree/param.h" // for TrainParam #include "../../../src/tree/updater_gpu_hist.cu" -#elif defined(XGBOOST_USE_HIP) -#include "../../../src/data/ellpack_page.hip.h" // for EllpackPageImpl -#include "../../../src/data/ellpack_page.h" // for EllpackPage -#include "../../../src/tree/param.h" // for TrainParam -#include "../../../src/tree/updater_gpu_hist.hip" -#endif #include "../filesystem.h" // dmlc::TemporaryDirectory #include "../helpers.h" #include "../histogram_helpers.h"