Skip to content

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

Description

@Andy-Jost

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.

Metadata

Metadata

Assignees

Labels

P2Low priority - Nice to havecuda.coreEverything related to the cuda.core modulefeatureNew feature or requesttriageNeeds the team's attention

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions