Skip to content

Commit 1e1277b

Browse files
committed
[SYCL][HIP] Enable hip_piEnqueueEventsWaitWithBarrier
This patch enables piEnqueueEventsWaitWithBarrier for the HIP plugin, it brings it to the same level as the CUDA plugin, see intel#3932. This fixes the `llvm-test-suite`, `SYCL/Basic/submit_barrier.cpp`, `SYCL/Basic/enqueue_barrier.cpp` and `SYCL/Basic/barrier_order.cpp` tests for the HIP plugin.
1 parent 3205368 commit 1e1277b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

sycl/plugins/hip/pi_hip.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@ pi_result hip_piEnqueueEventsWait(pi_queue command_queue,
366366
pi_uint32 num_events_in_wait_list,
367367
const pi_event *event_wait_list,
368368
pi_event *event);
369+
pi_result hip_piEnqueueEventsWaitWithBarrier(pi_queue command_queue,
370+
pi_uint32 num_events_in_wait_list,
371+
const pi_event *event_wait_list,
372+
pi_event *event);
369373
pi_result hip_piEventRelease(pi_event event);
370374
pi_result hip_piEventRetain(pi_event event);
371375

@@ -3420,6 +3424,14 @@ pi_result hip_piEnqueueEventsWait(pi_queue command_queue,
34203424
pi_uint32 num_events_in_wait_list,
34213425
const pi_event *event_wait_list,
34223426
pi_event *event) {
3427+
return hip_piEnqueueEventsWaitWithBarrier(
3428+
command_queue, num_events_in_wait_list, event_wait_list, event);
3429+
}
3430+
3431+
pi_result hip_piEnqueueEventsWaitWithBarrier(pi_queue command_queue,
3432+
pi_uint32 num_events_in_wait_list,
3433+
const pi_event *event_wait_list,
3434+
pi_event *event) {
34233435
if (!command_queue) {
34243436
return PI_INVALID_QUEUE;
34253437
}
@@ -4862,6 +4874,7 @@ pi_result piPluginInit(pi_plugin *PluginInit) {
48624874
_PI_CL(piEnqueueKernelLaunch, hip_piEnqueueKernelLaunch)
48634875
_PI_CL(piEnqueueNativeKernel, hip_piEnqueueNativeKernel)
48644876
_PI_CL(piEnqueueEventsWait, hip_piEnqueueEventsWait)
4877+
_PI_CL(piEnqueueEventsWaitWithBarrier, hip_piEnqueueEventsWaitWithBarrier)
48654878
_PI_CL(piEnqueueMemBufferRead, hip_piEnqueueMemBufferRead)
48664879
_PI_CL(piEnqueueMemBufferReadRect, hip_piEnqueueMemBufferReadRect)
48674880
_PI_CL(piEnqueueMemBufferWrite, hip_piEnqueueMemBufferWrite)

0 commit comments

Comments
 (0)