Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion source/adapters/cuda/command_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,19 @@ urCommandBufferReleaseExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
UR_APIEXPORT ur_result_t UR_APICALL
urCommandBufferFinalizeExp(ur_exp_command_buffer_handle_t hCommandBuffer) {
try {
const unsigned long long flags = 0;
#if CUDA_VERSION >= 12000
UR_CHECK_ERROR(cuGraphInstantiate(&hCommandBuffer->CudaGraphExec,
hCommandBuffer->CudaGraph, 0));
hCommandBuffer->CudaGraph, flags));
#elif CUDA_VERSION >= 11040
UR_CHECK_ERROR(cuGraphInstantiateWithFlags(
&hCommandBuffer->CudaGraphExec, hCommandBuffer->CudaGraph, flags));
#else
// Cannot use flags
UR_CHECK_ERROR(cuGraphInstantiate(&hCommandBuffer->CudaGraphExec,
hCommandBuffer->CudaGraph, nullptr,
nullptr, 0));
#endif
} catch (...) {
return UR_RESULT_ERROR_UNKNOWN;
}
Expand Down