Skip to content

Commit 7ed7dc1

Browse files
[SYCL][CUDA] Adds unimplemented cuda_piEnqueueEventsWaitWithBarrier (#3581)
Adds the function cuda_piEnqueueEventsWaitWithBarrier for piEnqueueEventsWaitWithBarrier in PI CUDA. The underlying functionality is currently unimplemented. Signed-off-by: Steffen Larsen <[email protected]>
1 parent 4c34f93 commit 7ed7dc1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

sycl/plugins/cuda/pi_cuda.cpp

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3320,6 +3320,28 @@ pi_result cuda_piEnqueueEventsWait(pi_queue command_queue,
33203320
}
33213321
}
33223322

3323+
/// Enqueues a wait on the given CUstream for all specified events (See
3324+
/// \ref enqueueEventWait.) If the events list is empty, the enqueued wait will
3325+
/// wait on all previous events in the queue.
3326+
/// TODO: Implement this.
3327+
///
3328+
/// \param[in] command_queue A valid PI queue.
3329+
/// \param[in] num_events_in_wait_list Number of events in event_wait_list.
3330+
/// \param[in] event_wait_list Events to wait on.
3331+
/// \param[out] event Event for when all events in event_wait_list have finished
3332+
/// or, if event_wait_list is empty, when all previous events in the queue have
3333+
/// finished.
3334+
///
3335+
/// \return TBD
3336+
pi_result cuda_piEnqueueEventsWaitWithBarrier(pi_queue command_queue,
3337+
pi_uint32 num_events_in_wait_list,
3338+
const pi_event *event_wait_list,
3339+
pi_event *event) {
3340+
cl::sycl::detail::pi::die(
3341+
"cuda_piEnqueueEventsWaitWithBarrier not implemented");
3342+
return {};
3343+
}
3344+
33233345
/// Gets the native CUDA handle of a PI event object
33243346
///
33253347
/// \param[in] event The PI event to get the native CUDA object of.
@@ -4710,6 +4732,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
47104732
_PI_CL(piEnqueueKernelLaunch, cuda_piEnqueueKernelLaunch)
47114733
_PI_CL(piEnqueueNativeKernel, cuda_piEnqueueNativeKernel)
47124734
_PI_CL(piEnqueueEventsWait, cuda_piEnqueueEventsWait)
4735+
_PI_CL(piEnqueueEventsWaitWithBarrier, cuda_piEnqueueEventsWaitWithBarrier)
47134736
_PI_CL(piEnqueueMemBufferRead, cuda_piEnqueueMemBufferRead)
47144737
_PI_CL(piEnqueueMemBufferReadRect, cuda_piEnqueueMemBufferReadRect)
47154738
_PI_CL(piEnqueueMemBufferWrite, cuda_piEnqueueMemBufferWrite)

0 commit comments

Comments
 (0)