Migrate stream APIs from rmm::cuda_stream_view to cuda::stream_ref - #5639
Open
bdice wants to merge 11 commits into
Open
Migrate stream APIs from rmm::cuda_stream_view to cuda::stream_ref#5639bdice wants to merge 11 commits into
bdice wants to merge 11 commits into
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
18 tasks
bdice
force-pushed
the
cuda-stream-ref
branch
from
September 2, 2026 04:21
a41c149 to
367238f
Compare
bdice
marked this pull request as ready for review
September 2, 2026 22:55
rapids-bot Bot
pushed a commit
to rapidsai/cugraph-gnn
that referenced
this pull request
Sep 3, 2026
) ## Summary Track the coordinated migration of stream APIs and call sites from `rmm::cuda_stream_view` to CCCL's `cuda::stream_ref`. This propagates `cuda::stream_ref` through RMM containers and memory resources, RAFT resource and handle APIs, downstream C++ interfaces, Python/Cython bindings, benchmarks, tests, and documentation. This updates the cuGraph-GNN developer guide to document `cuda::stream_ref` as the stream type used by stream-ordered operations. Depends on rapidsai/cugraph#5639. Tracked in rapidsai/build-planning#318. ## Migrations - Pass `cuda::stream_ref` through stream pools, resource accessors, conditionals, and downstream APIs without converting to `rmm::cuda_stream_view` - Use `cuda::stream_ref` constructions for default/legacy/per-thread streams - `rmm::cuda_stream_default` ➡️ `cuda::stream_ref{cudaStream_t{cudaStreamDefault}}` - `rmm::cuda_stream_legacy` ➡️ `cuda::stream_ref{cudaStreamLegacy}` - `rmm::cuda_stream_per_thread` ➡️ `cuda::stream_ref{cudaStreamPerThread}` - Use `.get()` when calling an API that requires a raw `cudaStream_t`, including CUDA runtime, library, CUB, and legacy API boundaries (previously `rmm::cuda_stream_view` used `value()`) - Use `.sync()` when synchronizing a `cuda::stream_ref` (previously `rmm::cuda_stream_view` used `synchronize()`) - Update Cython declarations and call sites to pass stream references directly where supported Authors: - Bradley Dice (https://github.com/bdice) Approvers: - Alex Barghi (https://github.com/alexbarghi-nv) URL: #529
seunghwak
reviewed
Sep 3, 2026
| size_t mem_frugal_threshold, // take the memory frugal approach (instead of thrust::sort) if # | ||
| // elements to groupby is no smaller than this value | ||
| rmm::cuda_stream_view stream_view, | ||
| cuda::stream_ref stream_view, |
Contributor
There was a problem hiding this comment.
We have been mixing stream_view and stream. stream_view now sounds like a misnomer. Better use stream consistently?
Contributor
Author
There was a problem hiding this comment.
cuda::stream_ref is still a non-owning stream view, and stream_view remains common across this codebase (159 declarations). I retained existing parameter names to keep this API migration from becoming a broad naming-only change.
bdice
force-pushed
the
cuda-stream-ref
branch
from
September 5, 2026 20:00
3a27e16 to
3c519b8
Compare
bdice
force-pushed
the
cuda-stream-ref
branch
from
September 6, 2026 02:11
406f17c to
b8ee95b
Compare
bdice
force-pushed
the
cuda-stream-ref
branch
from
September 6, 2026 14:15
b8ee95b to
8657731
Compare
Signed-off-by: Bradley Dice <bdice@bradleydice.com>
bdice
force-pushed
the
cuda-stream-ref
branch
from
September 6, 2026 14:35
8657731 to
7e4d73a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Track the coordinated migration of stream APIs and call sites from
rmm::cuda_stream_viewto CCCL'scuda::stream_ref. This propagatescuda::stream_refthrough RMM containers and memory resources, RAFT resource and handle APIs, downstream C++ interfaces, Python/Cython bindings, benchmarks, tests, and documentation.This migrates affected cuGraph API signatures and call sites, including the MTMG handle stream accessor, while preserving
cuda::stream_refuntil a raw stream is required.Depends on rapidsai/rmm#2372 and NVIDIA/raft#3129.
Tracked in rapidsai/build-planning#318.
Migrations
cuda::stream_refthrough stream pools, resource accessors, conditionals, and downstream APIs without converting tormm::cuda_stream_viewcuda::stream_refconstructions for default/legacy/per-thread streamsrmm::cuda_stream_default➡️cuda::stream_ref{cudaStream_t{cudaStreamDefault}}rmm::cuda_stream_legacy➡️cuda::stream_ref{cudaStreamLegacy}rmm::cuda_stream_per_thread➡️cuda::stream_ref{cudaStreamPerThread}.get()when calling an API that requires a rawcudaStream_t, including CUDA runtime, library, CUB, and legacy API boundaries (previouslyrmm::cuda_stream_viewusedvalue()).sync()when synchronizing acuda::stream_ref(previouslyrmm::cuda_stream_viewusedsynchronize())