[DOC]: `PinnedMemoryResource.allocate` documents no parameters

Đang mở Phù hợp với người mới
#2,712 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
90/100
Loại issue
Tài liệu
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
documentation

Hướng nghiên cứu

Bắt đầu với docstring override một dòng trong cuda_core/cuda/core/_memory/_pinned_memory_resource.pyx và so sánh các phần thân numpydoc đầy đủ hoặc các tham chiếu chéo đến lớp cơ sở được sử dụng ở nơi khác trong cuda.core. Hoàn thành khi trang PinnedMemoryResource.allocate được render ghi lại đối số stream bắt buộc chỉ nhận theo từ khóa, giá trị trả về và điều kiện RuntimeError.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

triage
Is this a duplicate?
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

Ngôn ngữ chính
Cython
Star
3.4k
Fork
329
Merge trung bình
1 ngày 21 giờ
Pull request đã merge (30 ngày)
113

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NVIDIA/cuda-python

Tất cả issue của NVIDIA/cuda-python

Issue tương tự

Thêm issue về Documentation

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.