Skip to content

fix(cuda.core): point the stream protocol warning at Device.create_stream - #3522

Open
Iamsohungrynow wants to merge 2 commits into
NVIDIA:mainfrom
Iamsohungrynow:fix/stream-protocol-warning-advice
Open

Iamsohungrynow wants to merge 2 commits into
NVIDIA:mainfrom
Iamsohungrynow:fix/stream-protocol-warning-advice

Conversation

@Iamsohungrynow

@Iamsohungrynow Iamsohungrynow commented Nov 21, 2026 •

Copy link
Copy Markdown

Description

closes #3505

the deprecation warning told users to convert with Stream(obj), but Stream.__init__ always raises, so it points at device.create_stream(obj) now

Checklist

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

…ream

Signed-off-by: Iamsohungrynow <261225237+Iamsohungrynow@users.noreply.github.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Nov 21, 2026
@coderabbitai

coderabbitai Bot commented Nov 21, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • Bug Fixes
    • Updated the deprecation warning for foreign stream objects to recommend Device.create_stream(obj) instead of Stream(obj). This clarifies the suggested conversion API when a foreign stream is passed through the stream protocol; stream conversion behavior is unchanged.

The __cuda_stream__ deprecation warning now directs callers to Device.create_stream(obj) instead of Stream(obj). The test expectation uses the updated guidance.

Changes: Stream warning correction

Layer / File(s) Summary
Update stream conversion guidance
cuda_core/cuda/core/_stream.pyx, cuda_core/tests/test_launcher.py
The deprecation warning and its test expectation now name Device.create_stream(obj).

Assessment against linked issues

Objective Addressed Explanation
Update the __cuda_stream__ deprecation warning to name the working conversion API, Device.create_stream(obj) [#3505] ✅

Suggested reviewers: andy-jost

Change: Bug fix · Severity of issue fixed: Low

Merge Risk: Minimal · up to 6db8e

This updates a deprecation warning so it recommends the working call, device.create_stream(obj), instead of Stream(obj), which raises. The change is limited to message text and its test, so the merge risk is minimal. The failing PR metadata check should be fixed by adding an assignee, labels, and a milestone.

Security architecture risk: Minimal · up to b30df

The change corrects migration advice without describing any change to stream creation, permissions, ownership, or runtime behavior.

Finishing Touches

Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between b30dfb9 and 6db8e6e.

Files selected for processing: 2

  • cuda_core/cuda/core/_stream.pyx
  • cuda_core/tests/test_launcher.py
Files skipped from review as they are similar to previous changes: 2

  • cuda_core/cuda/core/_stream.pyx
  • cuda_core/tests/test_launcher.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7de038b and b30dfb9.

Files selected for processing: 2

  • cuda_core/cuda/core/_stream.pyx
  • cuda_core/tests/test_launcher.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

Comment thread cuda_core/cuda/core/_stream.pyx Resolved
Signed-off-by: Iamsohungrynow <261225237+Iamsohungrynow@users.noreply.github.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: the __cuda_stream__ deprecation warning points to Stream(obj), which always raises

1 participant