Skip to content

cuda.core: update PyTorch example to use native __cuda_stream__ - #2305

Merged
juenglin merged 2 commits into
mainfrom
issue-1083
Jul 8, 2026
Merged

cuda.core: update PyTorch example to use native __cuda_stream__#2305
juenglin merged 2 commits into
mainfrom
issue-1083

Conversation

@juenglin

Copy link
Copy Markdown
Contributor

Signed-off-by: Ralf Juengling rjuengling@nvidia.com

Description

closes#1083

Drop the PyTorchStreamWrapper helper and pass the PyTorch stream
directly to Device.create_stream() now that PyTorch implements
__cuda_stream__ natively.

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@copy-pr-bot

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-actionsgithub-actionsBot added the cuda.core Everything related to the cuda.core module label Jul 6, 2026
@juenglinjuenglin added the documentation Improvements or additions to documentation label Jul 6, 2026
@juenglinjuenglin self-assigned this Jul 6, 2026
@juenglinjuenglin added this to the cuda.core next milestone Jul 6, 2026
@juenglin
juenglin requested review from Andy-Jost and leofangJuly 6, 2026 23:59
@juenglin

Copy link
Copy Markdown
ContributorAuthor

/ok to test 6830ace

@github-actions

This comment has been minimized.

@Andy-JostAndy-Jost left a comment

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.

LGTM!

Comment threadcuda_core/examples/pytorch_example.py
@leofangleofang added P1 Medium priority - Should do example Improvements or additions to code examples and removed documentation Improvements or additions to documentation labels Jul 7, 2026
@Andy-JostAndy-Jost mentioned this pull request Jul 7, 2026
14 tasks
@juenglin
juenglin enabled auto-merge (squash) July 7, 2026 23:29
@juenglin
juenglin merged commit f33ac1f into mainJul 8, 2026
104 checks passed
@juenglin
juenglin deleted the issue-1083 branch July 8, 2026 01:30
@github-actions

Copy link
Copy Markdown
Doc Preview CI
Preview removed because the pull request was closed or merged.

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

Labels

cuda.coreEverything related to the cuda.core moduleexampleImprovements or additions to code examplesP1Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update PyTorch example to skip using a custom stream adaptor

3 participants

@juenglin@leofang@Andy-Jost