From c6f2b8c841d17217c5b5ed8cb1bf37f42940544c Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Tue, 15 Sep 2020 08:57:22 +0800 Subject: [PATCH] Upgrade gputreeshap. (#6099) * Upgrade gputreeshap. Co-authored-by: Rory Mitchell --- gputreeshap | 2 +- src/predictor/gpu_predictor.cu | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gputreeshap b/gputreeshap index 1de23c95f..3fd8bb118 160000 --- a/gputreeshap +++ b/gputreeshap @@ -1 +1 @@ -Subproject commit 1de23c95ff07d086db02837fb4a746b6924abbd5 +Subproject commit 3fd8bb118ffc8516f86417253aacdae1531977f4 diff --git a/src/predictor/gpu_predictor.cu b/src/predictor/gpu_predictor.cu index 65d90982b..fe9664a55 100644 --- a/src/predictor/gpu_predictor.cu +++ b/src/predictor/gpu_predictor.cu @@ -30,6 +30,7 @@ struct SparsePageView { common::Span d_row_ptr; bst_feature_t num_features; + SparsePageView() = default; XGBOOST_DEVICE SparsePageView(common::Span data, common::Span row_ptr, bst_feature_t num_features) @@ -562,6 +563,7 @@ class GPUPredictor : public xgboost::Predictor { << " approximate is not implemented in GPU Predictor."; } + dh::safe_cuda(cudaSetDevice(generic_param_->gpu_id)); uint32_t real_ntree_limit = ntree_limit * model.learner_model_param->num_output_group; if (real_ntree_limit == 0 || real_ntree_limit > model.trees.size()) {