You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid using non-polymorphic CUDA graph APIs internally #2778
The non-polymorphic graph APIs (that is, those calling out the node names/types) are considered deprecated and will be removed in a future CUDA release. We should have everything we need to migrate to the polymorphic versions such as cuGraphAddKernelNode, cuGraphExecKernelNodeSetParam, ...
Deprecated driver-side surface, by node family. Replacement is the polymorphic API (cuGraphAddNode, cuGraphNodeGetParams, cuGraphNodeSetParams, cuGraphExecNodeSetParams on CUgraphNodeParams).
Mem alloc/free: cuGraphAddMemAllocNode, cuGraphMemAllocNodeGetParams, cuGraphAddMemFreeNode, cuGraphMemFreeNodeGetParams
Legacy parameter type aliases — use the versioned ..._v2 types that CUgraphNodeParams already references: CUDA_KERNEL_NODE_PARAMS, CUDA_MEMSET_NODE_PARAMS, CUDA_HOST_NODE_PARAMS, CUDA_EXT_SEM_SIGNAL_NODE_PARAMS, CUDA_EXT_SEM_WAIT_NODE_PARAMS, CUDA_BATCH_MEM_OP_NODE_PARAMS, CUDA_MEM_ALLOC_NODE_PARAMS
Kernel-node attribute aliases — CUkernelNodeAttrID and the CU_KERNEL_NODE_ATTRIBUTE_* enumerators are deprecated in favor of CUlaunchAttributeID and the corresponding CU_LAUNCH_ATTRIBUTE_*.
The polymorphic APIs were added in CUDA 12.2 and 12.3 and cuda.core 1.x still supports drivers all the way back to 12.0. There are two viable migration paths for updating a non-polymorphic call, A(), to a polymorphic one, B():
Wait for CUDA 14 / cuda.core 2.0, then directly replace A() with B() throughout.
Migrate early. The code goes through an intermediate state with extra runtime checks, e.g., A() if version() < (12, 2, 0) else B().
If there is no compelling reason to update early, the first option should be preferred: fewer changes, simpler code, marginally more performant.
Activity
leofang commentedon Sep 8, 2026
Deprecated driver-side surface, by node family. Replacement is the polymorphic API (
cuGraphAddNode,cuGraphNodeGetParams,cuGraphNodeSetParams,cuGraphExecNodeSetParamsonCUgraphNodeParams).Node-type-specific APIs
cuGraphAddKernelNode,cuGraphKernelNodeGetParams,cuGraphKernelNodeSetParams,cuGraphExecKernelNodeSetParamscuGraphAddMemcpyNode,cuGraphMemcpyNodeGetParams,cuGraphMemcpyNodeSetParams,cuGraphExecMemcpyNodeSetParamscuGraphAddMemsetNode,cuGraphMemsetNodeGetParams,cuGraphMemsetNodeSetParams,cuGraphExecMemsetNodeSetParamscuGraphAddHostNode,cuGraphHostNodeGetParams,cuGraphHostNodeSetParams,cuGraphExecHostNodeSetParamscuGraphAddChildGraphNode,cuGraphChildGraphNodeGetGraph,cuGraphExecChildGraphNodeSetParamscuGraphAddEmptyNodecuGraphAddEventRecordNode,cuGraphEventRecordNodeGetEvent,cuGraphEventRecordNodeSetEvent,cuGraphExecEventRecordNodeSetEventcuGraphAddEventWaitNode,cuGraphEventWaitNodeGetEvent,cuGraphEventWaitNodeSetEvent,cuGraphExecEventWaitNodeSetEventcuGraphAddExternalSemaphoresSignalNode,cuGraphExternalSemaphoresSignalNodeGetParams,cuGraphExternalSemaphoresSignalNodeSetParams,cuGraphExecExternalSemaphoresSignalNodeSetParamscuGraphAddExternalSemaphoresWaitNode,cuGraphExternalSemaphoresWaitNodeGetParams,cuGraphExternalSemaphoresWaitNodeSetParams,cuGraphExecExternalSemaphoresWaitNodeSetParamscuGraphAddBatchMemOpNode,cuGraphBatchMemOpNodeGetParams,cuGraphBatchMemOpNodeSetParams,cuGraphExecBatchMemOpNodeSetParamscuGraphAddMemAllocNode,cuGraphMemAllocNodeGetParams,cuGraphAddMemFreeNode,cuGraphMemFreeNodeGetParamsLegacy parameter type aliases — use the versioned
..._v2types thatCUgraphNodeParamsalready references:CUDA_KERNEL_NODE_PARAMS,CUDA_MEMSET_NODE_PARAMS,CUDA_HOST_NODE_PARAMS,CUDA_EXT_SEM_SIGNAL_NODE_PARAMS,CUDA_EXT_SEM_WAIT_NODE_PARAMS,CUDA_BATCH_MEM_OP_NODE_PARAMS,CUDA_MEM_ALLOC_NODE_PARAMSKernel-node attribute aliases —
CUkernelNodeAttrIDand theCU_KERNEL_NODE_ATTRIBUTE_*enumerators are deprecated in favor ofCUlaunchAttributeIDand the correspondingCU_LAUNCH_ATTRIBUTE_*.-- Leo's bot
Andy-Jost commentedon Sep 8, 2026
The polymorphic APIs were added in CUDA 12.2 and 12.3 and cuda.core 1.x still supports drivers all the way back to 12.0. There are two viable migration paths for updating a non-polymorphic call,
A(), to a polymorphic one,B():A()withB()throughout.A() if version() < (12, 2, 0) else B().If there is no compelling reason to update early, the first option should be preferred: fewer changes, simpler code, marginally more performant.
leofang commentedon Sep 9, 2026
Agreed to move this to cuda.core v2.0.0.