You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DOC]: PinnedMemoryResource.allocate documents no parameters #2712
Is this for new documentation, or an update to existing docs?
Update
Describe the incorrect/future/missing documentation
The rendered page for PinnedMemoryResource.allocate is a single sentence. It does not say what the required keyword-only stream argument must be, what the method returns, or that the method raises RuntimeError when the device does not support the requested host memory pool. The one-line docstring on the override in cuda_core/cuda/core/_memory/_pinned_memory_resource.pyx is all autodoc has to render.
fromcuda.coreimportPinnedMemoryResourcedoc=PinnedMemoryResource.allocate.__doc__print(doc)
print("documents the 'stream' parameter:", "stream :"indoc)
print("documents a return value:", "Returns"indoc)
PinnedMemoryResource.allocate(self, size_t size, *, stream: Stream | GraphBuilder) -> Buffer
Allocate a host-pinned buffer asynchronously on the supplied stream.
documents the 'stream' parameter: False
documents a return value: False
Expected: the page states that stream is required and has no default, what allocate returns, and that it raises RuntimeError on a device without the required host memory pool support. Either the full numpydoc body or a cross-reference to the base class would fill the gap, and both shapes are already used elsewhere in cuda.core.
If this is a correction, please provide a link to the incorrect documentation. If this is a new documentation request, please link to where you have looked.
Activity