Skip to content

Expose type aliases and protocols via cuda.core.typing#1827

Merged
leofang merged 3 commits intoNVIDIA:mainfrom
leofang:expose-typing
Apr 7, 2026
Merged

Expose type aliases and protocols via cuda.core.typing#1827
leofang merged 3 commits intoNVIDIA:mainfrom
leofang:expose-typing

Conversation

@leofang
Copy link
Copy Markdown
Member

@leofang leofang commented Mar 29, 2026

Summary

  • Add a public cuda.core.typing module that re-exports IsStreamT and DevicePointerT — type annotations that appear in cuda.core public API signatures but were previously only accessible via private module paths
  • Update api_private.rst docs to reference cuda.core.typing.IsStreamT and cuda.core.typing.DevicePointerT
  • Add tests verifying imports and identity with the original definitions

Closes #1419

Test plan

  • test_typing_module_importsIsStreamT and DevicePointerT importable from cuda.core.typing
  • test_typing_matches_private_definitions — re-exports are identical objects to the private definitions

-- Leo's bot

leofang and others added 2 commits March 27, 2026 01:06
Add a public cuda.core.typing module that re-exports type aliases
and protocols used in cuda.core API signatures (IsStreamT,
DevicePointerT, VirtualMemory*T). These were previously only
accessible via private module paths, which broke in v0.5.0.

Closes NVIDIA#1419

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@copy-pr-bot
Copy link
Copy Markdown
Contributor

copy-pr-bot bot commented Mar 29, 2026

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.

@leofang leofang added this to the cuda.core v0.7.0 milestone Apr 7, 2026
@leofang leofang requested review from Andy-Jost and rparolin April 7, 2026 19:35
@leofang leofang self-assigned this Apr 7, 2026
@leofang leofang added enhancement Any code-related improvements cuda.core Everything related to the cuda.core module labels Apr 7, 2026
@leofang leofang marked this pull request as ready for review April 7, 2026 19:35
@leofang
Copy link
Copy Markdown
Member Author

leofang commented Apr 7, 2026

/ok to test fdaabf8

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

@mdboom mdboom left a comment

Choose a reason for hiding this comment

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

LGTM. I'm sure we'll want to do more of this over time, but this is a good start.

@leofang leofang merged commit da79d63 into NVIDIA:main Apr 7, 2026
96 checks passed
@leofang leofang deleted the expose-typing branch April 7, 2026 22:23
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 enhancement Any code-related improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: cuda.core.experimental._stream.IsStreamT and cuda.core.experimental._memory.DevicePointerT missing in v0.5.0

2 participants