add hip.h
This commit is contained in:
parent
7663d47383
commit
b22644fc10
6
src/collective/device_communicator.hip.h
Normal file
6
src/collective/device_communicator.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2022 XGBoost contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "device_communicator.cuh"
|
||||
6
src/collective/device_communicator_adapter.hip.h
Normal file
6
src/collective/device_communicator_adapter.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2022 XGBoost contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "device_communicator_adapter.cuh"
|
||||
6
src/collective/nccl_device_communicator.hip.h
Normal file
6
src/collective/nccl_device_communicator.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2022 XGBoost contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "nccl_device_communicator.cuh"
|
||||
6
src/common/algorithm.hip.h
Normal file
6
src/common/algorithm.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Copyright 2022-2023 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "algorithm.cuh" // Span,byte
|
||||
6
src/common/cuda_context.hip.h
Normal file
6
src/common/cuda_context.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Copyright 2022 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "cuda_context.cuh"
|
||||
6
src/common/deterministic.hip.h
Normal file
6
src/common/deterministic.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Copyright 2020-2023 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "deterministic.cuh" // XGBOOST_DEVICE
|
||||
9
src/common/hist_util.hip.h
Normal file
9
src/common/hist_util.hip.h
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* 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"
|
||||
6
src/common/linalg_op.hip.h
Normal file
6
src/common/linalg_op.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2021-2022 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "linalg_op.cuh"
|
||||
3
src/common/quantile.hip.h
Normal file
3
src/common/quantile.hip.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#include "quantile.cuh"
|
||||
6
src/common/ranking_utils.hip.h
Normal file
6
src/common/ranking_utils.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Copyright 2023 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ranking_utils.cuh" // for Span
|
||||
6
src/common/stats.hip.h
Normal file
6
src/common/stats.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Copyright 2022-2023 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "stats.cuh" // Span
|
||||
6
src/common/threading_utils.hip.h
Normal file
6
src/common/threading_utils.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Copyright 2021-2023 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "threading_utils.cuh" // Span
|
||||
7
src/data/device_adapter.hip.h
Normal file
7
src/data/device_adapter.hip.h
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Copyright 2019-2023 by XGBoost Contributors
|
||||
* \file device_adapter.cuh
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "device_adapter.cuh"
|
||||
6
src/data/ellpack_page.hip.h
Normal file
6
src/data/ellpack_page.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2019 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "ellpack_page.cuh"
|
||||
6
src/data/proxy_dmatrix.hip.h
Normal file
6
src/data/proxy_dmatrix.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Copyright 2021-2023 XGBoost contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "proxy_dmatrix.cuh"
|
||||
7
src/data/simple_dmatrix.hip.h
Normal file
7
src/data/simple_dmatrix.hip.h
Normal file
@ -0,0 +1,7 @@
|
||||
/**
|
||||
* Copyright 2019-2023 by XGBoost Contributors
|
||||
* \file simple_dmatrix.cuh
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "simple_dmatrix.cuh" // for HasInfInData
|
||||
6
src/objective/lambdarank_obj.hip.h
Normal file
6
src/objective/lambdarank_obj.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* Copyright 2023 XGBoost contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "lambdarank_obj.cuh" // for Span
|
||||
8
src/tree/constraints.hip.h
Normal file
8
src/tree/constraints.hip.h
Normal file
@ -0,0 +1,8 @@
|
||||
/*!
|
||||
* Copyright 2019 XGBoost contributors
|
||||
*
|
||||
* \file Various constraints used in GPU_Hist.
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "constraints.cuh"
|
||||
6
src/tree/gpu_hist/evaluate_splits.hip.h
Normal file
6
src/tree/gpu_hist/evaluate_splits.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2020 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "evaluate_splits.cuh"
|
||||
6
src/tree/gpu_hist/expand_entry.hip.h
Normal file
6
src/tree/gpu_hist/expand_entry.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2020 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "expand_entry.cuh"
|
||||
7
src/tree/gpu_hist/feature_groups.hip.h
Normal file
7
src/tree/gpu_hist/feature_groups.hip.h
Normal file
@ -0,0 +1,7 @@
|
||||
/*!
|
||||
* Copyright 2020 by XGBoost Contributors
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "feature_groups.cuh"
|
||||
6
src/tree/gpu_hist/gradient_based_sampler.hip.h
Normal file
6
src/tree/gpu_hist/gradient_based_sampler.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2019 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "gradient_based_sampler.cuh"
|
||||
6
src/tree/gpu_hist/histogram.hip.h
Normal file
6
src/tree/gpu_hist/histogram.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2020-2021 by XGBoost Contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "histogram.cuh"
|
||||
6
src/tree/gpu_hist/row_partitioner.hip.h
Normal file
6
src/tree/gpu_hist/row_partitioner.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2017-2022 XGBoost contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "row_partitioner.cuh"
|
||||
6
src/tree/updater_gpu_common.hip.h
Normal file
6
src/tree/updater_gpu_common.hip.h
Normal file
@ -0,0 +1,6 @@
|
||||
/*!
|
||||
* Copyright 2017-2019 XGBoost contributors
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "updater_gpu_common.cuh"
|
||||
@ -9,8 +9,13 @@
|
||||
#include <algorithm> // is_sorted
|
||||
#include <cstddef> // 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 {
|
||||
|
||||
@ -10,11 +10,19 @@
|
||||
#include <cmath>
|
||||
|
||||
#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/common/math.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
|
||||
|
||||
@ -3,7 +3,11 @@
|
||||
*/
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#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 "xgboost/context.h"
|
||||
#include "xgboost/linalg.h"
|
||||
|
||||
|
||||
@ -1,9 +1,15 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "test_quantile.h"
|
||||
#include "../helpers.h"
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
#include "../../../src/collective/device_communicator.cuh"
|
||||
#include "../../../src/common/hist_util.cuh"
|
||||
#include "../../../src/common/quantile.cuh"
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
#include "../../../src/collective/device_communicator.hip.h"
|
||||
#include "../../../src/common/hist_util.hip.h"
|
||||
#include "../../../src/common/quantile.hip.h"
|
||||
#endif
|
||||
|
||||
namespace xgboost {
|
||||
namespace {
|
||||
|
||||
@ -11,10 +11,17 @@
|
||||
#include <numeric> // for iota
|
||||
#include <vector> // 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
|
||||
|
||||
@ -7,8 +7,13 @@
|
||||
#include <utility> // std::pair
|
||||
#include <vector> // 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 "xgboost/base.h" // XGBOOST_DEVICE
|
||||
#include "xgboost/context.h" // Context
|
||||
#include "xgboost/host_device_vector.h" // HostDeviceVector
|
||||
|
||||
@ -4,8 +4,13 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <thrust/copy.h> // 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 {
|
||||
|
||||
@ -7,7 +7,11 @@
|
||||
#include "../helpers.h"
|
||||
#include <thrust/device_vector.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 "test_array_interface.h"
|
||||
|
||||
using namespace xgboost; // NOLINT
|
||||
|
||||
@ -3,8 +3,13 @@
|
||||
*/
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#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/iterative_dmatrix.h"
|
||||
#include "../../../src/tree/param.h" // TrainParam
|
||||
#include "../helpers.h"
|
||||
|
||||
@ -7,7 +7,11 @@
|
||||
#include <any> // for any_cast
|
||||
#include <memory>
|
||||
|
||||
#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"
|
||||
|
||||
|
||||
@ -4,7 +4,11 @@
|
||||
|
||||
#include <thrust/sequence.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 "../helpers.h"
|
||||
#include "test_array_interface.h"
|
||||
#include "../../../src/data/array_interface.h"
|
||||
|
||||
@ -1,7 +1,11 @@
|
||||
#include <xgboost/c_api.h>
|
||||
|
||||
#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 {
|
||||
|
||||
@ -7,8 +7,13 @@
|
||||
#include <cstdint> // for uint32_t
|
||||
#include <vector> // 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 {
|
||||
|
||||
@ -9,7 +9,11 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#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"
|
||||
|
||||
@ -1,6 +1,10 @@
|
||||
#include <gtest/gtest.h>
|
||||
#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 {
|
||||
|
||||
@ -3,7 +3,11 @@
|
||||
*/
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#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
|
||||
|
||||
@ -6,8 +6,13 @@
|
||||
#include <vector>
|
||||
|
||||
#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"
|
||||
|
||||
@ -9,7 +9,11 @@
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#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"
|
||||
|
||||
@ -12,10 +12,17 @@
|
||||
|
||||
#include "../../../src/common/common.h"
|
||||
#include "../../../src/data/sparse_page_source.h"
|
||||
#if defined(XGBOOST_USE_CUDA)
|
||||
#include "../../../src/tree/constraints.cuh"
|
||||
#include "../../../src/tree/param.h" // for TrainParam
|
||||
#include "../../../src/tree/updater_gpu_common.cuh"
|
||||
#include "../../../src/tree/updater_gpu_hist.cu"
|
||||
#elif defined(XGBOOST_USE_HIP)
|
||||
#include "../../../src/tree/constraints.hip.h"
|
||||
#include "../../../src/tree/param.h" // for TrainParam
|
||||
#include "../../../src/tree/updater_gpu_common.hip.h"
|
||||
#include "../../../src/tree/updater_gpu_hist.hip"
|
||||
#endif
|
||||
#include "../filesystem.h" // dmlc::TemporaryDirectory
|
||||
#include "../helpers.h"
|
||||
#include "../histogram_helpers.h"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user