Skip to content

Commit d687d94

Browse files
committed
Add cuda 11.8 #ifdef for cuEnqueueKernelEx.
Signed-off-by: JackAKirk <jack.kirk@codeplay.com>
1 parent e18c691 commit d687d94

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

source/adapters/cuda/enqueue.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueKernelLaunchCustomExp(
553553
pLocalWorkSize, numEventsInWaitList, phEventWaitList,
554554
phEvent);
555555
}
556-
556+
#if CUDA_VERSION >= 11080
557557
// Preconditions
558558
UR_ASSERT(hQueue->getDevice() == hKernel->getProgram()->getDevice(),
559559
UR_RESULT_ERROR_INVALID_KERNEL);
@@ -722,6 +722,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueKernelLaunchCustomExp(
722722
return Err;
723723
}
724724
return UR_RESULT_SUCCESS;
725+
#endif // CUDA_VERSION >= 11080
726+
setErrorMessage("This feature requires cuda 11.8 or later.",
727+
UR_RESULT_ERROR_ADAPTER_SPECIFIC);
728+
return UR_RESULT_ERROR_ADAPTER_SPECIFIC;
725729
}
726730

727731
/// Set parameters for general 3D memory copy.

0 commit comments

Comments
 (0)