Skip to content

cuda.core: add graph definition node updates#2395

Draft
Andy-Jost wants to merge 17 commits into
NVIDIA:mainfrom
Andy-Jost:graph-definition-node-updates
Draft

cuda.core: add graph definition node updates#2395
Andy-Jost wants to merge 17 commits into
NVIDIA:mainfrom
Andy-Jost:graph-definition-node-updates

Conversation

@Andy-Jost

Copy link
Copy Markdown
Contributor

Summary

Add atomic parameter mutation for graph definition nodes, starting with event-record nodes. This draft establishes the shared generic-setter and attachment transaction path that the remaining node types will use.

This branch is stacked on #2357 for early CI coverage and will be rebased onto main after that PR merges.

Changes

  • Add a shared definition-node parameter update helper using cuGraphNodeSetParams.
  • Add EventRecordNode.update() with failure-atomic attachment replacement and cached-state commit.
  • Add parameterized node-update tests designed to extend across definition and executable updates.

Test Coverage

  • Full cuda-core graph test suite on ipp1-1093.
  • pre-commit run --all-files.

Related Work

Andy-Jost added 17 commits July 20, 2026 08:06
Preserve the validated lifetime and failure scenarios as executable specifications for the metadata redesign, alongside independent cleanup clarifications.
Establish canonical per-graph boxes, stable hierarchy ownership, and Level 1 graph identity before rebuilding attachment operations.
Give root and child graph handles stable per-graph boxes while sharing one hierarchy control block and registry identity.
Replace the mutable graph-wide slot table with complete per-node user objects and intrusive deferred cleanup.
Copy and rekey source attachment metadata into embedded graph hierarchies before publishing their canonical boxes.
Unregister and tombstone child graph boxes after CUDA destroys their owner while preserving stable storage for existing handles.
Allow graph-level anonymous attachments so a captured host callback stays safe when CUDA commits it but its node cannot be recovered.
Verify anonymous capture retention and proactive invalidation of child and conditional graph views.
Orient contributors to versioned node ownership, graph hierarchy metadata, clone propagation, invalidation, and deferred cleanup.
Make node identity atomic, preserve tombstoned graph identity, retry deferred cleanup safely, and cover final-reference launch ownership.
Document corrected graph attachment lifetime and callback-safe resource release.
Retain attachment owners and preallocate metadata before CUDA graph mutations so failures cannot leave nodes with unretained resources.
Carry rollback through the prepared attachment deleter so consumer extension modules do not depend on an out-of-line C++ symbol.
Preserve the general no-invalidation guarantee while documenting borrowed child graphs as a narrow driver-owned exception, and tighten implementation comments for reviewers.
Use the generic node setter with failure-atomic attachment replacement, establishing the shared path for definition-level parameter mutation.
@Andy-Jost Andy-Jost added this to the cuda.core 1.2.0 milestone Jul 20, 2026
@Andy-Jost Andy-Jost added P0 High priority - Must do! feature New feature or request cuda.core Everything related to the cuda.core module labels Jul 20, 2026
@Andy-Jost Andy-Jost self-assigned this Jul 20, 2026
@copy-pr-bot

copy-pr-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@Andy-Jost

Copy link
Copy Markdown
Contributor Author

/ok to test

@github-actions

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module feature New feature or request P0 High priority - Must do!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant