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) {
140
140
UR_APIEXPORT ur_result_t UR_APICALL
141
141
urCommandBufferFinalizeExp (ur_exp_command_buffer_handle_t hCommandBuffer) {
142
142
try {
143
+ const unsigned long long flags = 0 ;
144
+ #if CUDA_VERSION >= 12000
143
145
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
145
156
} catch (...) {
146
157
return UR_RESULT_ERROR_UNKNOWN;
147
158
}
You can’t perform that action at this time.
0 commit comments