Replace rmm::device_vector & thrust::host_vector with rmm::device_uvector & std::vector, respectively.#1421
Conversation
|
@afender you may want to review this. |
afender
left a comment
There was a problem hiding this comment.
Looks good but :
- consider using the latest streams features from RAFT
- could we think of a test to verify it is now executing on the stream?
| bucket_sizes_device_ptr, | ||
| VertexFrontierType::kNumBuckets, | ||
| handle.get_stream()); | ||
| CUDA_TRY(cudaStreamSynchronize(handle.get_stream())); |
There was a problem hiding this comment.
Do we really need this sync?
If so, consider handle.get_stream_view.synchronize() instead.
Or handle.wait_on_user_stream but this triggers worker stream sync as well
There was a problem hiding this comment.
This is necessary as without this, bucket_sizes (which is std::vector and is not aware of stream) is not guaranteed to hold up-to-date data and is used right after this sync.
CUDA_TRY(cudaStreamSynchronize(handle.get_stream())); this is also used all around the codebase, so I will create an issue to replace all at once.
| : handle_ptr_(&handle), elements_(capacity, invalid_vertex_id<vertex_t>::value) | ||
| : handle_ptr_(&handle), elements_(capacity, handle.get_stream()) | ||
| { | ||
| thrust::fill(rmm::exec_policy(handle_ptr_->get_stream())->on(handle_ptr_->get_stream()), |
There was a problem hiding this comment.
Consider replacing
thrust::fill(rmm::exec_policy(handle_ptr_->get_stream())->on(handle_ptr_->get_stream()),
by
thrust::fill(rmm::exec_policy(handle.get_stream_view()),
This applies to all thrust calls
There was a problem hiding this comment.
Yes, same story here. This should be replaced all at once.
This is tricky I guess; the first thing is this is not a black-or-white thing and this will affect only performance not correctness. I guess we need cuGraph-wise benchmark scheme to track multi-stream execution of (every) graph analytics? |
Codecov Report
@@ Coverage Diff @@
## branch-0.19 #1421 +/- ##
==============================================
Coverage ? 60.75%
==============================================
Files ? 70
Lines ? 3134
Branches ? 0
==============================================
Hits ? 1904
Misses ? 1230
Partials ? 0 Continue to review full report at Codecov.
|
Ok, for now I can rebase my concurrency branch and generate a profile after this gets merged. |
|
@gpucibot merge |
This PR partially addresses #1390