Skip to content

Commit 15752ab

Browse files
authored
Merge pull request #1682 from JackAKirk/launch-attr-cuda1180
[cuda] Add cuda 11.8 #ifdef for `cuEnqueueKernelEx`.
2 parents 1fa0d23 + bb2eab3 commit 15752ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source/adapters/cuda/enqueue.cpp

Lines changed: 6 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,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueKernelLaunchCustomExp(
722722
return Err;
723723
}
724724
return UR_RESULT_SUCCESS;
725+
#else
726+
setErrorMessage("This feature requires cuda 11.8 or later.",
727+
UR_RESULT_ERROR_ADAPTER_SPECIFIC);
728+
return UR_RESULT_ERROR_ADAPTER_SPECIFIC;
729+
#endif // CUDA_VERSION >= 11080
725730
}
726731

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

0 commit comments

Comments
 (0)