Skip to content

Use cuda::stream_ref across remaining libcudf APIs - #23691

Draft
vyasr wants to merge 2 commits into
NVIDIA:mainfrom
vyasr:codex/cuda-stream-ref-batch-5
Draft

Use cuda::stream_ref across remaining libcudf APIs#23691
vyasr wants to merge 2 commits into
NVIDIA:mainfrom
vyasr:codex/cuda-stream-ref-batch-5

Conversation

@vyasr

@vyasr vyasr commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Description

This fifth batch migrates the remaining core libcudf headers and implementations from rmm::cuda_stream_view to cuda::stream_ref.

It includes the final central stream utility API updates, such as the default stream and stream pool helpers, while keeping rmm::cuda_stream ownership unchanged. Tests, benchmarks, examples, and docs are split into follow-up draft PRs.

Contributes to #23636

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

copy-pr-bot Bot commented Aug 17, 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.

@github-actions github-actions Bot added libcudf Affects libcudf (C++/CUDA) code. Python Affects Python cuDF API. Java Affects Java cuDF API. pylibcudf Issues specific to the pylibcudf package labels Aug 17, 2026
@vyasr
vyasr force-pushed the codex/cuda-stream-ref-batch-5 branch from fa33c11 to 834a687 Compare August 17, 2026 23:02
@vyasr vyasr changed the title Use cuda::stream_ref across remaining RAPIDS surfaces Use cuda::stream_ref across remaining libcudf C++ surfaces Aug 17, 2026
@vyasr
vyasr force-pushed the codex/cuda-stream-ref-batch-5 branch from 834a687 to ee2961a Compare August 17, 2026 23:03
cudf::table_view const& table)
{
auto stream = rmm::cuda_stream_default;
auto stream = cuda::stream_ref{};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the default constructors like this are deprecated. Please check that. I see this in a few examples.

[[nodiscard]] bool may_evaluate_null(table_view const& left,
table_view const& right,
rmm::cuda_stream_view stream) const override;
cuda::stream_ref stream) const override;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file appears to be missing <cuda/stream> includes. Same for cpp/src/ast/jit/expressions.cpp and others in cpp/src/ast. Can you check everything for IWYU?

_null_handling{null_handling},
_mr{std::move(mr)},
_d_agg_kinds{0, rmm::cuda_stream_default, cudf::get_current_device_resource_ref()},
_d_agg_kinds{0, cuda::stream_ref{}, cudf::get_current_device_resource_ref()},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the nullary constructor is deprecated.

Comment thread cpp/src/utilities/default_stream.cpp Outdated
#else
rmm::cuda_stream_view const default_stream_value{};
cuda::stream_ref const default_stream_value{};

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be explicit and not default-constructed. But should it be set to cudaStreamLegacy or cudaStreamDefault? Probably Legacy?

Suggested change
cuda::stream_ref const default_stream_value{};
cuda::stream_ref const default_stream_value{cuda::stream_ref{cudaStreamLegacy}};

Comment thread cpp/tests/wrappers/timestamps_test.cu Outdated
#include <rmm/device_uvector.hpp>
#include <rmm/exec_policy.hpp>

#include <cuda/stream_ref>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few files like this with header changes but no changes in the code itself. I don't think the header is used. Can we audit for those files and remove the headers if they're not required?

@vyasr
vyasr force-pushed the codex/cuda-stream-ref-batch-5 branch from ee2961a to d6cfbf8 Compare August 17, 2026 23:48
@vyasr vyasr changed the title Use cuda::stream_ref across remaining libcudf C++ surfaces Use cuda::stream_ref across remaining libcudf APIs Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java Affects Java cuDF API. libcudf Affects libcudf (C++/CUDA) code. pylibcudf Issues specific to the pylibcudf package Python Affects Python cuDF API.

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants