Skip to content

Migrate stream APIs from rmm::cuda_stream_view to cuda::stream_ref - #529

Merged
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
bdice:cuda-stream-ref
Sep 3, 2026
Merged

Migrate stream APIs from rmm::cuda_stream_view to cuda::stream_ref#529
rapids-bot[bot] merged 1 commit into
rapidsai:mainfrom
bdice:cuda-stream-ref

Conversation

@bdice

@bdice bdice commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

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

@copy-pr-bot

copy-pr-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

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.

@bdice bdice changed the title Document cuda::stream_ref usage Migrate stream APIs from rmm::cuda_stream_view to cuda::stream_ref Sep 2, 2026
@bdice
bdice marked this pull request as ready for review September 2, 2026 22:55
@bdice
bdice requested a review from a team as a code owner September 2, 2026 22:55
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Updates the developer guide to identify cuda::stream_ref as the stream type accepted by stream-ordered rmm::device_uvector operations.

  • Replaces the obsolete cuda_stream_view reference with cuda::stream_ref.

Confidence Score: 5/5

The PR appears safe to merge.

The only change updates the documented stream type consistently with the stated API migration, with no runtime, build, or security behavior affected.

Important Files Changed

Filename Overview
cpp/docs/DEVELOPER_GUIDE.md The documentation-only stream type migration is accurate and introduces no substantive issue.

Reviews (1): Last reviewed commit: "Document cuda::stream_ref usage" | Re-trigger Greptile

@bdice bdice added breaking Introduces a breaking change improvement Improves an existing functionality labels Sep 3, 2026
@alexbarghi-nv

Copy link
Copy Markdown
Member

/merge

@rapids-bot
rapids-bot Bot merged commit 276ddd0 into rapidsai:main Sep 3, 2026
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Introduces a breaking change improvement Improves an existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants