NVIDIA / NVIDIA/cuda-python

[FEA] cuda.core: expose graph and graph-node identity/introspection APIs (CUDA 13.1)

Aperta
#2,360 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@Andy-Jost ci sta già lavorando.

Dal 24/7/2026.

cuda.core feature
Lingua principale
Cython
Stelle
3.4k
Fork
329
Merge medio
1g 23h
PR unite (30g)
116

Descrizione

Summary

CUDA 13.1 adds stable identifiers and navigation for graphs and nodes; CUDA 13.3 adds a related
function attribute. None are exposed by cuda.core.graph today.

Motivation: correlating cuda.core graph objects with profiler/tooling output (toolsNodeId),
diagnostics and logging, keying per-node bookkeeping for the update work in #2352 / #2354, and
navigating from a node back to its owning graph.

Underlying C APIs to cover

C API Purpose
cuGraphGetId(CUgraph, unsigned int* graphId) stable ID of a graph definition
cuGraphExecGetId(CUgraphExec, unsigned int* graphId) stable ID of an executable graph
cuGraphNodeGetLocalId(CUgraphNode, unsigned int* nodeId) node ID local to its graph
cuGraphNodeGetToolsId(CUgraphNode, unsigned long long* toolsNodeId) node ID as reported by profiling/tooling interfaces
cuGraphNodeGetContainingGraph(CUgraphNode, CUgraph*) navigate from node to owning graph
CU_FUNC_ATTRIBUTE_DEVICE_NODE_UPDATE_SUPPORTED (13.3) per-function attribute: kernel may perform device-side node updates

Design sketch (draft — needs design-meeting review)

[!IMPORTANT]
Starting point only, not a settled design — review in the cuda.core design meeting.

Read-only properties, no new objects:

  • .id on the graph-definition and executable-graph wrappers (mapping to
    cuGraphGetId / cuGraphExecGetId respectively);
  • .local_id, .tools_id, .containing_graph on the node wrappers in cuda.core.graph;
  • the 13.3 function attribute joins the existing kernel-attribute surface.

Open questions for the meeting:

  1. Exact mapping onto cuda.core's graph classes (which wrapper owns CUgraph vs CUgraphExec).
  2. Plain int IDs vs. small typed wrappers.
  3. containing_graph: return an existing wrapper (identity-cached) or a fresh non-owning one —
    consistent with #1187 / #1989 lifetime conventions.

References

-- Leo's bot

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.