> This page is for version 4.3.
> For other versions, use one of these documentation indexes:
> - 4.6 (Latest) (default): https://docs.nvidia.com/holoscan/sdk-user-guide/4-6-latest/llms.txt
> - ltsb-2.0: https://docs.nvidia.com/holoscan/sdk-user-guide/ltsb-2-0/llms.txt
> - 4.5: https://docs.nvidia.com/holoscan/sdk-user-guide/4-5/llms.txt
> - 4.4: https://docs.nvidia.com/holoscan/sdk-user-guide/4-4/llms.txt
> - 4.3: https://docs.nvidia.com/holoscan/sdk-user-guide/4-3/llms.txt
> - Archives: https://docs.nvidia.com/holoscan/sdk-user-guide/archives/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/holoscan/sdk-user-guide/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/holoscan/sdk-user-guide/_mcp/server.

# holoscan::utils::cuda::cudaGraphAddNodeCompat

> Version-aware wrapper for cudaGraphAddNode that maintains backward compatibility.

```cpp showLineNumbers={false}
cudaError_t holoscan::utils::cuda::cudaGraphAddNodeCompat(
    cudaGraphNode_t *pGraphNode,
    cudaGraph_t graph,
    const cudaGraphNode_t *pDependencies,
    const cudaGraphEdgeData *dependencyData,
    size_t numDependencies,
    cudaGraphNodeParams *nodeParams
)
```

Version-aware wrapper for cudaGraphAddNode that maintains backward compatibility.

This function automatically selects the appropriate CUDA Graph API based on the runtime version:

* CUDA 12.x: Uses cudaGraphAddNode\_v2
* CUDA 13.x+: Uses cudaGraphAddNode

This function is thread-safe and uses std::call\_once to ensure the symbol is resolved only once.

**Returns:** cudaError\_t CUDA error code