Skip to content

docs(cuda.core): document PinnedMemoryResource.allocate parameters - #2713

Open
fedonman wants to merge 1 commit into
NVIDIA:mainfrom
fedonman:docs-pinned-mr-allocate-params
Open

docs(cuda.core): document PinnedMemoryResource.allocate parameters#2713
fedonman wants to merge 1 commit into
NVIDIA:mainfrom
fedonman:docs-pinned-mr-allocate-params

Conversation

@fedonman

Copy link
Copy Markdown
Contributor

Description

closes #2712

PinnedMemoryResource.allocate overrides the inherited method with a one-line docstring, and that one line is all autodoc has to render, so the generated page for the public class documented neither the required keyword-only stream argument nor the return value, and never mentioned the RuntimeError raised when the device does not support the requested host memory pool. This gives the override the full numpydoc body, including a Raises section for that error. The .pyi stub is regenerated by the stubgen-pyx-cuda-core pre-commit hook rather than hand-edited.

Docstring-only change, so there is no new test. What the class now renders, and the existing suite:

$ python check.py
'stream :' in rendered docstring: True
'Returns' in rendered docstring: True
'Raises' in rendered docstring: True

$ python -m pytest tests/test_memory.py -q -p no:randomly
256 passed, 15 skipped in 10.65s

No release note: the one-line docstring landed in #2487, after the cuda-core-v1.1.1 tag, so nothing user-visible changed since the last release.

Checklist

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

The override's one-line docstring is what autodoc renders, so the
generated page for the public class documented neither the required
keyword-only stream argument nor the return value, and never
mentioned the RuntimeError raised when the device does not support
the requested host memory pool.

Give the override the full numpydoc body. The .pyi stub is
regenerated by the stubgen-pyx-cuda-core pre-commit hook.

Closes NVIDIA#2712.

Signed-off-by: Vyron Vasileiadis <hi@fedonman.com>
@copy-pr-bot

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

[DOC]: PinnedMemoryResource.allocate documents no parameters

1 participant