Skip to content

Commit

Permalink
Only destroy executable graph if command-buffer finalized
Browse files Browse the repository at this point in the history
  • Loading branch information
EwanC committed Feb 16, 2024
1 parent d93d7a3 commit 0ad5886
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion source/adapters/cuda/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ ur_exp_command_buffer_handle_t_::~ur_exp_command_buffer_handle_t_() {
cuGraphDestroy(CudaGraph);

// Release the memory allocated to the CudaGraphExec
cuGraphExecDestroy(CudaGraphExec);
if (CudaGraphExec) {
cuGraphExecDestroy(CudaGraphExec);
}
}

ur_exp_command_buffer_command_handle_t_::
Expand Down

0 comments on commit 0ad5886

Please sign in to comment.