[DOC]: `PinnedMemoryResource.allocate` documents no parameters
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Cython
- Sterne
- 3.4k
- Forks
- 329
- Ø Merge
- 1 T. 21 Std.
- Gemergte PRs (30 T.)
- 113
Beschreibung
Is this a duplicate?
- I confirmed there appear to be no duplicate issues for this bug and that I agree to the Code of Conduct
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.
from cuda.core import PinnedMemoryResource
doc = PinnedMemoryResource.allocate.__doc__
print(doc)
print("documents the 'stream' parameter:", "stream :" in doc)
print("documents a return value:", "Returns" in doc)
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.
https://nvidia.github.io/cuda-python/cuda-core/latest/generated/cuda.core.PinnedMemoryResource.html
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem einzeiligen Override-Docstring in cuda_core/cuda/core/_memory/_pinned_memory_resource.pyx und vergleiche die vollständigen numpydoc-Inhalte oder die an anderer Stelle in cuda.core verwendeten Querverweise auf die Basisklasse. Als abgeschlossen gilt die Aufgabe, wenn die gerenderte Seite für PinnedMemoryResource.allocate das erforderliche, nur per Schlüsselwort übergebbare stream-Argument, den Rückgabewert und die RuntimeError-Bedingung dokumentiert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Aktiv
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 90/100