File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -140,8 +140,19 @@ urCommandBufferReleaseExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
140140UR_APIEXPORT ur_result_t UR_APICALL
141141urCommandBufferFinalizeExp (ur_exp_command_buffer_handle_t hCommandBuffer) {
142142 try {
143+ const unsigned long long flags = 0 ;
144+ #if CUDA_VERSION >= 12000
143145 UR_CHECK_ERROR (cuGraphInstantiate (&hCommandBuffer->CudaGraphExec ,
144- hCommandBuffer->CudaGraph , 0 ));
146+ hCommandBuffer->CudaGraph , flags));
147+ #elif CUDA_VERSION >= 11040
148+ UR_CHECK_ERROR (cuGraphInstantiateWithFlags (
149+ &hCommandBuffer->CudaGraphExec , hCommandBuffer->CudaGraph , flags));
150+ #else
151+ // Cannot use flags
152+ UR_CHECK_ERROR (cuGraphInstantiate (&hCommandBuffer->CudaGraphExec ,
153+ hCommandBuffer->CudaGraph , nullptr ,
154+ nullptr , 0 ));
155+ #endif
145156 } catch (...) {
146157 return UR_RESULT_ERROR_UNKNOWN;
147158 }
You can’t perform that action at this time.
0 commit comments