[BUG]: MemcpyNode.update() rejects stream-captured memcpy nodes
まだ誰も着手していません。
評価
調査の方向性
cuda_core/cuda/core/graph/_subclasses.pyx の _is_supported_memcpy_descriptor から始め、GraphBuilder のストリームキャプチャの例を再現します。CU_MEMORYTYPE_UNIFIED ディスクリプタが MemcpyNode.update() によってどのように処理されるかを追跡します。キャプチャされた一次元 memcpy が NotImplementedError を発生させずに node.update(size=32) を受け入れ、この再現に対するカバレッジがあることをもって完了とします。
索引モデルが issue の本文から書いたものです。
説明
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 |
+-----------------------------------------------------------------------------------------+
- 主要言語
- Cython
- スター
- 3.4k
- フォーク
- 329
- 平均マージ
- 1日 21時間
- マージ済み PR(30日)
- 113
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
NVIDIA/cuda-python のほかの issue
-
bug cuda.core
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
NVIDIA/cuda-python#2886 · コメント 1 件 ·
-
triage
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
NVIDIA/cuda-python#2717 ·
-
triage
難易度 1/5 1〜3時間 初心者へのやさしさ 90/100
NVIDIA/cuda-python#2712 ·
-
triage
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
NVIDIA/cuda-python#2646 · リアクション 1 件 ·
-
cuda.core triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
NVIDIA/cuda-python#2435 · コメント 1 件 ·
NVIDIA/cuda-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
0xMiden/bridge-portal#132 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
newrelic-experimental/preflight#793 · コメント 1 件 ·
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
babalae/bettergi-scripts-list#3674 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
caddyserver/caddy#8046 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
zilliztech/memsearch#759 ·