Skip to content

DOC: Add admonition to docstrings for cuda.core handle properties - #573

Merged
leofang merged 3 commits into
NVIDIA:mainfrom
carterbox:dching/note-CUObject-c-pointer
Apr 26, 2025
Merged

DOC: Add admonition to docstrings for cuda.core handle properties#573
leofang merged 3 commits into
NVIDIA:mainfrom
carterbox:dching/note-CUObject-c-pointer

Conversation

@carterbox

Copy link
Copy Markdown
Contributor

Description

Adds caution admonition to documentation for users who are accessing the handle property of cuda.core objects. The alternative was to add a docstring for int() for the cuda.bindings python objects. However, these python objects are autogenerated, and I couldn't see where the bindings were generated from. There's just text at the top of all the pyx files that state the bindings are autogenerated and that they should not be manually edited.

closes#557

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

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@carterbox
carterboxforce-pushed the dching/note-CUObject-c-pointer branch from 3ccaf67 to 70ff96bCompareApril 22, 2025 23:26
@carterbox

Copy link
Copy Markdown
ContributorAuthor

/ok to test 70ff96b

@leofang
leofang self-requested a review April 22, 2025 23:30
@leofangleofang added documentation Improvements or additions to documentation P1 Medium priority - Should do cuda.core Everything related to the cuda.core module labels Apr 22, 2025
@leofangleofang added this to the cuda.core beta 4 milestone Apr 22, 2025
@github-actions

This comment has been minimized.

@leofang

leofang commented Apr 25, 2025

Copy link
Copy Markdown
Member

Sorry for delay @carterbox. Would you mind making the following changes:

  • python -> Python (capitalized)
  • the C struct -> the underlying C handle (most objects we're dealing with are just typed pointers/opaque descriptors)
  • do not mention getPtr

@carterbox

Copy link
Copy Markdown
ContributorAuthor

/ok to test 8d87136

@leofangleofang left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Another nit: Could you please not @ me in the commit message? GitHub messes up handling that, and I often ended up receiving dozens of notifications...

Comment threadcuda_core/cuda/core/experimental/_memory.py Outdated
@carterbox
carterboxforce-pushed the dching/note-CUObject-c-pointer branch from 8d87136 to db2d0b4CompareApril 25, 2025 20:43
@carterbox

Copy link
Copy Markdown
ContributorAuthor

/ok to test db2d0b4

@carterbox
carterbox requested a review from leofangApril 25, 2025 21:41
@leofang
leofang merged commit c71ed39 into NVIDIA:mainApr 26, 2025
@leofang

Copy link
Copy Markdown
Member

Thank you, Daniel!

@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 moduledocumentationImprovements or additions to documentationP1Medium priority - Should do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Correct usage of cuda.core._memory.Buffer?

2 participants

@carterbox@leofang