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

@ -0,0 +1,6 @@
/*!
* Copyright 2022 XGBoost contributors
*/
#pragma once
#include "device_communicator.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2022 XGBoost contributors
*/
#pragma once
#include "device_communicator_adapter.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2022 XGBoost contributors
*/
#pragma once
#include "nccl_device_communicator.cuh"

View File

@ -0,0 +1,6 @@
/**
* Copyright 2022-2023 by XGBoost Contributors
*/
#pragma once
#include "algorithm.cuh" // Span,byte

View File

@ -0,0 +1,6 @@
/**
* Copyright 2022 by XGBoost Contributors
*/
#pragma once
#include "cuda_context.cuh"

View File

@ -0,0 +1,6 @@
/**
* Copyright 2020-2023 by XGBoost Contributors
*/
#pragma once
#include "deterministic.cuh" // XGBOOST_DEVICE

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

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2021-2022 by XGBoost Contributors
*/
#pragma once
#include "linalg_op.cuh"

View File

@ -0,0 +1,3 @@
#pragma once
#include "quantile.cuh"

View 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
View File

@ -0,0 +1,6 @@
/**
* Copyright 2022-2023 by XGBoost Contributors
*/
#pragma once
#include "stats.cuh" // Span

View File

@ -0,0 +1,6 @@
/**
* Copyright 2021-2023 by XGBoost Contributors
*/
#pragma once
#include "threading_utils.cuh" // Span

View File

@ -0,0 +1,7 @@
/**
* Copyright 2019-2023 by XGBoost Contributors
* \file device_adapter.cuh
*/
#pragma once
#include "device_adapter.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2019 by XGBoost Contributors
*/
#pragma once
#include "ellpack_page.cuh"

View File

@ -0,0 +1,6 @@
/**
* Copyright 2021-2023 XGBoost contributors
*/
#pragma once
#include "proxy_dmatrix.cuh"

View File

@ -0,0 +1,7 @@
/**
* Copyright 2019-2023 by XGBoost Contributors
* \file simple_dmatrix.cuh
*/
#pragma once
#include "simple_dmatrix.cuh" // for HasInfInData

View File

@ -0,0 +1,6 @@
/**
* Copyright 2023 XGBoost contributors
*/
#pragma once
#include "lambdarank_obj.cuh" // for Span

View File

@ -0,0 +1,8 @@
/*!
* Copyright 2019 XGBoost contributors
*
* \file Various constraints used in GPU_Hist.
*/
#pragma once
#include "constraints.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2020 by XGBoost Contributors
*/
#pragma once
#include "evaluate_splits.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2020 by XGBoost Contributors
*/
#pragma once
#include "expand_entry.cuh"

View File

@ -0,0 +1,7 @@
/*!
* Copyright 2020 by XGBoost Contributors
*/
#pragma once
#include "feature_groups.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2019 by XGBoost Contributors
*/
#pragma once
#include "gradient_based_sampler.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2020-2021 by XGBoost Contributors
*/
#pragma once
#include "histogram.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2017-2022 XGBoost contributors
*/
#pragma once
#include "row_partitioner.cuh"

View File

@ -0,0 +1,6 @@
/*!
* Copyright 2017-2019 XGBoost contributors
*/
#pragma once
#include "updater_gpu_common.cuh"

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 {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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