Skip to content

Commit

Permalink
wrap cuda API calls in safe_cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiyueXu77 committed Jul 26, 2024
1 parent 9ab2d8d commit 96ab113
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tree/updater_gpu_hist.cu
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ struct GPUHistMakerDevice {
// copy the histogram out of GPU memory
common::Span<std::int8_t> erased = common::EraseType(hist_vec.Values());
std::vector<std::int8_t> h_data(erased.size());
cudaMemcpy(h_data.data(), erased.data(), erased.size(), cudaMemcpyDeviceToHost);
dh::safe_cuda(cudaMemcpy(h_data.data(), erased.data(), erased.size(), cudaMemcpyDeviceToHost));

// call the encryption plugin
auto src_hist = common::Span{reinterpret_cast<double const *>(h_data.data()), n};
Expand Down

0 comments on commit 96ab113

Please sign in to comment.