Skip to content

Commit

Permalink
Update GPUTreeShap
Browse files Browse the repository at this point in the history
  • Loading branch information
RAMitchell committed Sep 5, 2020
1 parent 15ffb9a commit 52ba1a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gputreeshap
4 changes: 2 additions & 2 deletions src/predictor/gpu_predictor.cu
Expand Up @@ -256,10 +256,10 @@ class DeviceModel {
auto& src_stats = model.trees.at(tree_idx)->GetStats();
dh::safe_cuda(cudaMemcpyAsync(
d_nodes + h_tree_segments[tree_idx - tree_begin], src_nodes.data(),
sizeof(RegTree::Node) * src_nodes.size(),cudaMemcpyDefault));
sizeof(RegTree::Node) * src_nodes.size(), cudaMemcpyDefault));
dh::safe_cuda(cudaMemcpyAsync(
d_stats + h_tree_segments[tree_idx - tree_begin], src_stats.data(),
sizeof(RTreeNodeStat) * src_stats.size(),cudaMemcpyDefault));
sizeof(RTreeNodeStat) * src_stats.size(), cudaMemcpyDefault));
}

tree_group = std::move(HostDeviceVector<int>(model.tree_info.size(), 0, gpu_id));
Expand Down

0 comments on commit 52ba1a6

Please sign in to comment.