Skip to content

Commit 273ac6b

Browse files
committed
Only destroy executable graph if command-buffer finalized
1 parent b1a32ba commit 273ac6b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

source/adapters/cuda/command_buffer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ ur_exp_command_buffer_handle_t_::~ur_exp_command_buffer_handle_t_() {
6666
cuGraphDestroy(CudaGraph);
6767

6868
// Release the memory allocated to the CudaGraphExec
69-
cuGraphExecDestroy(CudaGraphExec);
69+
if (CudaGraphExec) {
70+
cuGraphExecDestroy(CudaGraphExec);
71+
}
7072
}
7173

7274
ur_exp_command_buffer_command_handle_t_::

0 commit comments

Comments
 (0)