From bf562bd33c2d5e7c229be4ef4793644f979c1dab Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Wed, 18 Aug 2021 14:02:19 +0800 Subject: [PATCH] Remove unused code. (#7175) --- src/tree/gpu_hist/row_partitioner.cu | 12 +----------- src/tree/updater_gpu_hist.cu | 20 +------------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/tree/gpu_hist/row_partitioner.cu b/src/tree/gpu_hist/row_partitioner.cu index db9d878e5..36baa9557 100644 --- a/src/tree/gpu_hist/row_partitioner.cu +++ b/src/tree/gpu_hist/row_partitioner.cu @@ -1,5 +1,5 @@ /*! - * Copyright 2017-2019 XGBoost contributors + * Copyright 2017-2021 XGBoost contributors */ #include #include @@ -10,16 +10,6 @@ namespace xgboost { namespace tree { - -struct IndicateLeftTransform { - bst_node_t left_nidx; - explicit IndicateLeftTransform(bst_node_t left_nidx) : left_nidx(left_nidx) {} - __host__ __device__ __forceinline__ size_t - operator()(const bst_node_t& x) const { - return x == left_nidx ? 1 : 0; - } -}; - struct IndexFlagTuple { size_t idx; size_t flag; diff --git a/src/tree/updater_gpu_hist.cu b/src/tree/updater_gpu_hist.cu index 9ba233334..1e2673f05 100644 --- a/src/tree/updater_gpu_hist.cu +++ b/src/tree/updater_gpu_hist.cu @@ -1,5 +1,5 @@ /*! - * Copyright 2017-2020 XGBoost contributors + * Copyright 2017-2021 XGBoost contributors */ #include #include @@ -239,24 +239,6 @@ struct GPUHistMakerDevice { } } - // Get vector of at least n initialised streams - std::vector& GetStreams(int n) { - if (n > streams.size()) { - for (auto& stream : streams) { - dh::safe_cuda(cudaStreamDestroy(stream)); - } - - streams.clear(); - streams.resize(n); - - for (auto& stream : streams) { - dh::safe_cuda(cudaStreamCreate(&stream)); - } - } - - return streams; - } - // Reset values for each update iteration // Note that the column sampler must be passed by value because it is not // thread safe