File tree Expand file tree Collapse file tree
cuda_core/cuda/core/graph Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ from cuda.core._resource_handles cimport (
3434 graph_prepare_attachment,
3535)
3636from cuda.core._utils.cuda_utils cimport HANDLE_RETURN
37+ from cuda.core._utils.version cimport cy_binding_version, cy_driver_version
3738
3839from cuda.core.graph._host_callback cimport (
3940 _is_py_host_trampoline,
@@ -71,6 +72,19 @@ cdef void _set_definition_node_params(
7172 cydriver.CUgraphNodeParams* params,
7273 OpaqueHandle owner0,
7374 OpaqueHandle owner1 = OpaqueHandle()) except * :
75+ cdef tuple version = cy_driver_version()
76+ if version < (12 , 2 , 0 ):
77+ raise RuntimeError (
78+ " Graph node mutation requires CUDA driver 12.2 or newer; "
79+ f" using driver version {'.'.join(map(str, version))}"
80+ )
81+ version = cy_binding_version()
82+ if version < (12 , 2 , 0 ):
83+ raise RuntimeError (
84+ " Graph node mutation requires cuda.bindings 12.2 or newer; "
85+ f" using cuda.bindings version {'.'.join(map(str, version))}"
86+ )
87+
7488 cdef GraphHandle h_graph = graph_node_get_graph(h_node)
7589 cdef cydriver.CUgraphNode node = as_cu(h_node)
7690 cdef PreparedAttachment prepared
You can’t perform that action at this time.
0 commit comments