rm device_helpers.hip.h from cu

This commit is contained in:
amdsc21 2023-03-26 00:24:11 +01:00
parent ee582f03c3
commit 7ee4734d3a
27 changed files with 14 additions and 167 deletions

View File

@ -19,13 +19,7 @@
#include <vector>
#include "categorical.h"
#if defined(XGBOOST_USE_CUDA)
#include "device_helpers.cuh"
#elif defined(XGBOOST_USE_HIP)
#include "device_helpers.hip.h"
#endif
#include "hist_util.cuh"
#include "hist_util.h"
#include "math.h" // NOLINT

View File

@ -11,12 +11,7 @@
#include "xgboost/data.h"
#include "xgboost/host_device_vector.h"
#include "xgboost/tree_model.h"
#if defined(XGBOOST_USE_CUDA)
#include "device_helpers.cuh"
#elif defined(XGBOOST_USE_HIP)
#include "device_helpers.hip.h"
#endif
namespace xgboost {

View File

@ -3,12 +3,7 @@
*/
#include <thrust/execution_policy.h>
#if defined(XGBOOST_USE_CUDA)
#include "device_helpers.cuh" // dh::Reduce, dh::XGBCachingDeviceAllocator
#elif defined(XGBOOST_USE_HIP)
#include "device_helpers.hip.h" // dh::Reduce, dh::XGBCachingDeviceAllocator
#endif
#include "numeric.h"
#include "xgboost/context.h" // Context
#include "xgboost/host_device_vector.h" // HostDeviceVector

View File

@ -16,13 +16,7 @@
#include "../collective/device_communicator.cuh"
#include "categorical.h"
#include "common.h"
#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 "quantile.h"

View File

@ -7,13 +7,7 @@
#include <cstddef> // size_t
#include "cuda_context.cuh" // CUDAContext
#if defined(XGBOOST_USE_CUDA)
#include "device_helpers.cuh" // dh::MakeTransformIterator, tcbegin, tcend
#elif defined(XGBOOST_USE_HIP)
#include "device_helpers.hip.h" // dh::MakeTransformIterator, tcbegin, tcend
#endif
#include "optional_weight.h" // common::OptionalWeights
#include "stats.cuh" // common::SegmentedQuantile, common::SegmentedWeightedQuantile
#include "xgboost/base.h" // XGBOOST_DEVICE

View File

@ -5,13 +5,7 @@
* \brief Handles setting metainfo from array interface.
*/
#include "../common/cuda_context.cuh"
#if defined(XGBOOST_USE_CUDA)
#include "../common/device_helpers.cuh"
#elif defined(XGBOOST_USE_HIP)
#include "../common/device_helpers.hip.h"
#endif
#include "../common/linalg_op.cuh"
#include "array_interface.h"
#include "device_adapter.cuh"

View File

@ -2,12 +2,7 @@
* Copyright 2021 by Contributors
*/
#if defined(XGBOOST_USE_CUDA)
#include "../common/device_helpers.cuh"
#elif defined(XGBOOST_USE_HIP)
#include "../common/device_helpers.hip.h"
#endif
#include "xgboost/context.h"
#include "xgboost/linalg.h"
#include "xgboost/span.h"

View File

@ -11,13 +11,7 @@
#include "coordinate_common.h"
#include "../common/common.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/timer.h"
#include "./param.h"

View File

@ -20,23 +20,14 @@
#include "metric_common.h"
#include "xgboost/metric.h"
#if defined(XGBOOST_USE_CUDA)
#if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP)
#include <thrust/execution_policy.h> // thrust::cuda::par
#include <thrust/functional.h> // thrust::plus<>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/transform_reduce.h>
#include "../common/device_helpers.cuh"
#endif // XGBOOST_USE_CUDA
#if defined(XGBOOST_USE_HIP)
#include <thrust/execution_policy.h> // thrust::hip::par
#include <thrust/functional.h> // thrust::plus<>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/transform_reduce.h>
#include "../common/device_helpers.hip.h"
#endif // XGBOOST_USE_HIP
#endif // defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP)
namespace xgboost {
namespace metric {

View File

@ -14,23 +14,14 @@
#include "../common/threading_utils.h"
#include "metric_common.h" // MetricNoCache
#if defined(XGBOOST_USE_CUDA)
#if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP)
#include <thrust/execution_policy.h> // thrust::cuda::par
#include <thrust/functional.h> // thrust::plus<>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/transform_reduce.h>
#include "../common/device_helpers.cuh"
#endif // XGBOOST_USE_CUDA
#if defined(XGBOOST_USE_HIP)
#include <thrust/execution_policy.h> // thrust::hip::par
#include <thrust/functional.h> // thrust::plus<>
#include <thrust/iterator/counting_iterator.h>
#include <thrust/transform_reduce.h>
#include "../common/device_helpers.hip.h"
#endif // XGBOOST_USE_HIP
#endif // XGBOOST_USE_CUDA || XGBOOST_USE_HIP
namespace xgboost {
namespace metric {

View File

@ -19,15 +19,10 @@
#include "xgboost/json.h"
#include "xgboost/metric.h"
#if defined(XGBOOST_USE_CUDA)
#if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP)
#include <thrust/execution_policy.h> // thrust::cuda::par
#include "../common/device_helpers.cuh"
#endif // XGBOOST_USE_CUDA
#if defined(XGBOOST_USE_HIP)
#include <thrust/execution_policy.h> // thrust::hip::par
#include "../common/device_helpers.hip.h"
#endif // XGBOOST_USE_HIP
#endif // XGBOOST_USE_CUDA || XGBOOST_USE_HIP
using AFTParam = xgboost::common::AFTParam;
using ProbabilityDistributionType = xgboost::common::ProbabilityDistributionType;

View File

@ -12,13 +12,7 @@
#endif
#include "../common/cuda_context.cuh" // CUDAContext
#if defined(XGBOOST_USE_CUDA)
#include "../common/device_helpers.cuh"
#elif defined(XGBOOST_USE_HIP)
#include "../common/device_helpers.hip.h"
#endif
#include "../common/stats.cuh"
#include "adaptive.h"
#include "xgboost/context.h"

View File

@ -15,27 +15,20 @@
#include "../common/math.h"
#include "../common/random.h"
#if defined(__CUDACC__)
#if defined(__CUDACC__) || defined(__HIP_PLATFORM_AMD__)
#include <thrust/sort.h>
#include <thrust/gather.h>
#include <thrust/iterator/discard_iterator.h>
#include <thrust/random/uniform_int_distribution.h>
#include <thrust/random/linear_congruential_engine.h>
#if defined(__CUDACC__)
#include <cub/util_allocator.cuh>
#elif defined(__HIP_PLATFORM_AMD__)
#include <hipcub/util_allocator.hpp>
#endif
#include "../common/device_helpers.cuh"
#elif defined(__HIP_PLATFORM_AMD__)
#include <thrust/sort.h>
#include <thrust/gather.h>
#include <thrust/iterator/discard_iterator.h>
#include <thrust/random/uniform_int_distribution.h>
#include <thrust/random/linear_congruential_engine.h>
#include <hipcub/util_allocator.hpp>
#include "../common/device_helpers.hip.h"
#endif
namespace xgboost {

View File

@ -35,12 +35,9 @@
#include "xgboost/span.h"
#include "xgboost/tree_model.h" // RegTree
#if defined(XGBOOST_USE_CUDA)
#if defined(XGBOOST_USE_CUDA) || defined(XGBOOST_USE_HIP)
#include "../common/device_helpers.cuh"
#include "../common/linalg_op.cuh"
#elif defined(XGBOOST_USE_HIP)
#include "../common/device_helpers.hip.h"
#include "../common/linalg_op.cuh"
#endif // defined(XGBOOST_USE_CUDA), defined(XGBOOST_USE_HIP)
namespace xgboost {

View File

@ -14,13 +14,7 @@
#include "../common/bitfield.h"
#include "../common/categorical.h"
#include "../common/common.h"
#if defined(XGBOOST_USE_CUDA)
#include "../common/device_helpers.cuh"
#elif defined(XGBOOST_USE_HIP)
#include "../common/device_helpers.hip.h"
#endif
#include "../data/device_adapter.cuh"
#include "../data/ellpack_page.cuh"
#include "../data/proxy_dmatrix.h"

View File

@ -14,12 +14,7 @@
#include "xgboost/span.h"
#include "constraints.cuh"
#include "param.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 {

View File

@ -12,13 +12,7 @@
#include <cstddef> // std::size_t
#include "../collective/device_communicator.cuh" // DeviceCommunicator
#if defined(XGBOOST_USE_CUDA)
#include "../common/device_helpers.cuh" // dh::MakeTransformIterator
#elif defined(XGBOOST_USE_HIP)
#include "../common/device_helpers.hip.h" // dh::MakeTransformIterator
#endif
#include "fit_stump.h"
#include "xgboost/base.h" // GradientPairPrecise, GradientPair, XGBOOST_DEVICE
#include "xgboost/context.h" // Context

View File

@ -6,19 +6,14 @@
#include <limits>
#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"
#include <hip/hip_cooperative_groups.h>
#endif
#include "../../data/ellpack_page.cuh"
#include "evaluate_splits.cuh"
#include "expand_entry.cuh"
#if defined(XGBOOST_USE_HIP)
#include <hip/hip_cooperative_groups.h>
#define WARP_SIZE WAVEFRONT_SIZE
#elif defined(XGBOOST_USE_CUDA)
#define WARP_SIZE 32

View File

@ -7,12 +7,7 @@
#include <thrust/logical.h> // thrust::any_of
#include <thrust/sort.h> // thrust::stable_sort
#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" // common::HistogramCuts
#include "evaluate_splits.cuh"
#include "xgboost/data.h"

View File

@ -7,13 +7,7 @@
#include <vector>
#include "feature_groups.cuh"
#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"
namespace xgboost {

View File

@ -9,13 +9,7 @@
#include <limits>
#include "../../common/deterministic.cuh"
#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"
#include "histogram.cuh"
#include "row_partitioner.cuh"

View File

@ -7,12 +7,7 @@
#include <vector>
#if defined(XGBOOST_USE_CUDA)
#include "../../common/device_helpers.cuh"
#elif defined(XGBOOST_USE_HIP)
#include "../../common/device_helpers.hip.h"
#endif
#include "row_partitioner.cuh"
namespace xgboost {

View File

@ -17,13 +17,7 @@
#include "../common/categorical.h"
#include "../common/cuda_context.cuh" // CUDAContext
#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/io.h"
#include "../common/timer.h"

View File

@ -6,12 +6,7 @@
#include <thrust/equal.h>
#include <thrust/iterator/counting_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 <xgboost/host_device_vector.h>
namespace xgboost {

View File

@ -7,11 +7,7 @@
#include <thrust/device_vector.h>
#include <thrust/execution_policy.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 <xgboost/span.h>
#include "test_span.h"

View File

@ -6,12 +6,7 @@
#include <xgboost/data.h>
#include <xgboost/json.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 "test_array_interface.h"
#include "test_metainfo.h"

View File

@ -10,12 +10,7 @@
#include <set>
#include "../../../src/tree/constraints.cuh"
#include "../../../src/tree/param.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 {
namespace {