add hip.h

This commit is contained in:
amdsc21
2023-05-20 01:25:33 +02:00
parent 7663d47383
commit b22644fc10
44 changed files with 249 additions and 0 deletions

View File

@@ -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 {

View File

@@ -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

View File

@@ -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"

View File

@@ -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 {

View File

@@ -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

View File

@@ -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

View File

@@ -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 {