Skip to content

Commit 1c41c2a

Browse files
committed
Fix options check
1 parent 2b1a3d1 commit 1c41c2a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cuda_core/cuda/core/experimental/_graph.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,10 +278,11 @@ def complete(self, options: Optional[CompleteOptions] = None) -> Graph:
278278

279279
if (_driver_ver < 12000) or (_py_major_minor < (12, 0)):
280280
flags = 0
281-
if options.auto_free_on_launch:
282-
flags |= driver.CUgraphInstantiate_flags.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH
283-
if options.use_node_priority:
284-
flags |= driver.CUgraphInstantiate_flags.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY
281+
if options:
282+
if options.auto_free_on_launch:
283+
flags |= driver.CUgraphInstantiate_flags.CUDA_GRAPH_INSTANTIATE_FLAG_AUTO_FREE_ON_LAUNCH
284+
if options.use_node_priority:
285+
flags |= driver.CUgraphInstantiate_flags.CUDA_GRAPH_INSTANTIATE_FLAG_USE_NODE_PRIORITY
285286
return Graph._init(handle_return(driver.cuGraphInstantiateWithFlags(self._mnff.graph, flags)))
286287

287288
params = driver.CUDA_GRAPH_INSTANTIATE_PARAMS()

0 commit comments

Comments
 (0)