[BUG]: MemcpyNode.update() rejects stream-captured memcpy nodes
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Bắt đầu với _is_supported_memcpy_descriptor trong cuda_core/cuda/core/graph/_subclasses.pyx và tái hiện ví dụ bắt stream của GraphBuilder. Theo dõi cách các descriptor CU_MEMORYTYPE_UNIFIED được MemcpyNode.update() xử lý. Được xem là hoàn tất khi memcpy một chiều đã được bắt chấp nhận node.update(size=32) mà không phát sinh NotImplementedError, với coverage cho trường hợp tái hiện này.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
Type of Bug
Runtime Error
Component
cuda.core
Describe the bug
MemcpyNode.update() raises NotImplementedError on every memcpy node produced by stream capture. Buffer.copy_from and Buffer.copy_to lower to cuMemcpyAsync, which the driver records with CU_MEMORYTYPE_UNIFIED on both operands, and _is_supported_memcpy_descriptor in cuda_core/cuda/core/graph/_subclasses.pyx admits only CU_MEMORYTYPE_HOST and CU_MEMORYTYPE_DEVICE. Capturing a GraphBuilder is the primary way to build a graph in cuda.core, so update() is unavailable on most memcpy nodes a user ends up holding.
How to Reproduce
from cuda.core import Device
from cuda.core.graph import MemcpyNode
dev = Device()
dev.set_current()
stream = dev.create_stream()
src = dev.memory_resource.allocate(64, stream=stream)
dst = dev.memory_resource.allocate(64, stream=stream)
stream.sync()
builder = dev.create_graph_builder().begin_building()
dst.copy_from(src, stream=builder)
builder.end_building()
node = next(n for n in builder.graph_definition.nodes() if isinstance(n, MemcpyNode))
node.update(size=32)
Output:
Traceback (most recent call last):
File "<stdin>", line 16, in <module>
File "cuda/core/graph/_subclasses.pyx", line 874, in cuda.core.graph._subclasses.MemcpyNode.update
NotImplementedError: updating multidimensional, pitched, offset, or array-backed memcpy nodes is not supported
Expected behavior
node.update(size=32) should replace the copy size. The descriptor the driver recorded for this node is one-dimensional, unpitched and unoffset, so none of the reasons given in the error apply to it.
Operating System
Ubuntu 26.04 LTS
nvidia-smi output
Sun Aug 16 21:24:13 2026
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 595.84 Driver Version: 595.84 CUDA Version: 13.2 |
+-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA GeForce RTX 3050 ... Off | 00000000:01:00.0 Off | N/A |
| N/A 62C P8 4W / 35W | 66MiB / 4096MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
+-----------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=========================================================================================|
| 0 N/A N/A 6822 G /usr/bin/gnome-shell 1MiB |
| 0 N/A N/A 1071386 G /app/libexec/stremio/stremio 1MiB |
+-----------------------------------------------------------------------------------------+
- Ngôn ngữ chính
- Cython
- Star
- 3.4k
- Fork
- 334
- Merge trung bình
- 1 ngày 19 giờ
- Pull request đã merge (30 ngày)
- 130
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của NVIDIA/cuda-python
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
NVIDIA/cuda-python#2952 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[DOC]: cuda.core 1.1.1 note misstates program cache permissionsCó thể đã có người làm @leofang đã nhận 12 ngày trước. Đang mởdocumentation P1
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
NVIDIA/cuda-python#2717 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[DOC]: `PinnedMemoryResource.allocate` documents no parametersCó thể đã có người làm @Andy-Jost đã nhận 12 ngày trước. Đang mởcuda.core documentation P1
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
NVIDIA/cuda-python#2712 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG]: LocatedHeaderDir is mutable, so callers can poison the cached header-directory lookupCó thể đã có người làm @rwgk đã nhận 12 ngày trước. Đang mởtriage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
NVIDIA/cuda-python#2646 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[FEA]: Support inheritance from BufferCó thể đã có người làm @leofang đã nhận 12 ngày trước. Đang mởcuda.core triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
NVIDIA/cuda-python#2435 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của NVIDIA/cuda-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
prime-radiant-inc/evener#3873 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
micromatch/picomatch#223 ·
Maintainer thường phản hồi trong vòng 11 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mksglu/context-mode#1268 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
[bug] Setup fails with "Cannot find matching keyid" when an older Node's corepack is on PATHCó thể đã có người làm @EyalPoly đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày