enable rocm, fix algorithm.cuh
This commit is contained in:
parent
62c4efac51
commit
d8cc93f3f2
@ -148,8 +148,13 @@ void SegmentedArgSort(Context const *ctx, Span<U> values, Span<V> group_ptr,
|
|||||||
sorted_idx_out.data().get(), sorted_idx.size(), n_groups, group_ptr.data(),
|
sorted_idx_out.data().get(), sorted_idx.size(), n_groups, group_ptr.data(),
|
||||||
group_ptr.data() + 1, ctx->CUDACtx()->Stream());
|
group_ptr.data() + 1, ctx->CUDACtx()->Stream());
|
||||||
|
|
||||||
|
#if defined(XGBOOST_USE_HIP)
|
||||||
|
dh::safe_cuda(hipMemcpyAsync(sorted_idx.data(), sorted_idx_out.data().get(),
|
||||||
|
sorted_idx.size_bytes(), hipMemcpyDeviceToDevice));
|
||||||
|
#else
|
||||||
dh::safe_cuda(cudaMemcpyAsync(sorted_idx.data(), sorted_idx_out.data().get(),
|
dh::safe_cuda(cudaMemcpyAsync(sorted_idx.data(), sorted_idx_out.data().get(),
|
||||||
sorted_idx.size_bytes(), cudaMemcpyDeviceToDevice));
|
sorted_idx.size_bytes(), cudaMemcpyDeviceToDevice));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user