NVIDIA / NVIDIA/cuda-python

cuda.core: support multidimensional and array-backed graph memcpy nodes

Open
#2,420 0 comments 0 reactions 1 assignee View on GitHub

@Andy-Jost is already working on this.

Since Jul 24, 2026.

cuda.core feature P1
Dominant language
Cython
Stars
3.4k
Forks
329
Avg merge
1d 23h
Merged PRs (30d)
116

Description

Background

GraphDefinition.memcpy() currently models only a 1D pointer-to-pointer copy, while CUDA graph memcpy nodes contain full CUDA_MEMCPY3D descriptors with offsets, pitches, height/depth, and array endpoints. Captured or externally created graphs can therefore contain memcpy nodes that cuda.core cannot faithfully inspect or mutate.

This is a follow-up to #2352 and #2395.

Scope

Add end-to-end support for multidimensional and array-backed graph memcpy nodes, including:

  • Explicit construction of 2D/3D, pitched, offset, and array-backed copies.
  • Node properties that faithfully represent the complete copy descriptor.
  • Partial updates that preserve every omitted descriptor field. CUDA 13.2 and newer should preserve the recorded copy context automatically; on CUDA 12.2 through 13.1, the intended context must be current during updates.
  • Correct ownership handling for pointer, host-memory, and array endpoints.
  • Reconstruction of explicit, captured, and externally created memcpy nodes without flattening them to 1D.
  • Public API documentation and release notes.

Acceptance criteria

  • Explicitly constructed and captured 2D/3D memcpy nodes round-trip through inspection without losing descriptor fields.
  • Pitched, offset, and array-backed copies can be constructed, instantiated, and launched successfully.
  • Partial updates change only requested fields and preserve ownership metadata. CUDA 13.2 and newer preserve the recorded context; the current-context requirement for CUDA 12.2 through 13.1 is documented.
  • Existing executable graphs retain their old parameters and resources after definition updates.
  • Unsupported endpoint or descriptor combinations fail before mutating the graph.
  • Tests cover host/device pointers, pitched and offset copies, array endpoints, reconstruction, ownership lifetime, context behavior, and failed-update atomicity.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.