@@ -311,6 +311,10 @@ pi_result cuda_piEnqueueEventsWait(pi_queue command_queue,
311
311
pi_uint32 num_events_in_wait_list,
312
312
const pi_event *event_wait_list,
313
313
pi_event *event);
314
+ pi_result cuda_piEnqueueEventsWaitWithBarrier (pi_queue command_queue,
315
+ pi_uint32 num_events_in_wait_list,
316
+ const pi_event *event_wait_list,
317
+ pi_event *event);
314
318
pi_result cuda_piEventRelease (pi_event event);
315
319
pi_result cuda_piEventRetain (pi_event event);
316
320
@@ -3279,11 +3283,33 @@ pi_result cuda_piEventRelease(pi_event event) {
3279
3283
3280
3284
// / Enqueues a wait on the given CUstream for all events.
3281
3285
// / See \ref enqueueEventWait
3286
+ // / TODO: Add support for multiple streams once the Event class is properly
3287
+ // / refactored.
3282
3288
// /
3283
3289
pi_result cuda_piEnqueueEventsWait (pi_queue command_queue,
3284
3290
pi_uint32 num_events_in_wait_list,
3285
3291
const pi_event *event_wait_list,
3286
3292
pi_event *event) {
3293
+ return cuda_piEnqueueEventsWaitWithBarrier (
3294
+ command_queue, num_events_in_wait_list, event_wait_list, event);
3295
+ }
3296
+
3297
+ // / Enqueues a wait on the given CUstream for all specified events (See
3298
+ // / \ref enqueueEventWaitWithBarrier.) If the events list is empty, the enqueued
3299
+ // / wait will wait on all previous events in the queue.
3300
+ // /
3301
+ // / \param[in] command_queue A valid PI queue.
3302
+ // / \param[in] num_events_in_wait_list Number of events in event_wait_list.
3303
+ // / \param[in] event_wait_list Events to wait on.
3304
+ // / \param[out] event Event for when all events in event_wait_list have finished
3305
+ // / or, if event_wait_list is empty, when all previous events in the queue have
3306
+ // / finished.
3307
+ // /
3308
+ // / \return TBD
3309
+ pi_result cuda_piEnqueueEventsWaitWithBarrier (pi_queue command_queue,
3310
+ pi_uint32 num_events_in_wait_list,
3311
+ const pi_event *event_wait_list,
3312
+ pi_event *event) {
3287
3313
if (!command_queue) {
3288
3314
return PI_INVALID_QUEUE;
3289
3315
}
@@ -3317,26 +3343,6 @@ pi_result cuda_piEnqueueEventsWait(pi_queue command_queue,
3317
3343
}
3318
3344
}
3319
3345
3320
- // / Enqueues a wait on the given CUstream for all specified events (See
3321
- // / \ref enqueueEventWait.) If the events list is empty, the enqueued wait will
3322
- // / wait on all previous events in the queue.
3323
- // / TODO: Implement this.
3324
- // /
3325
- // / \param[in] command_queue A valid PI queue.
3326
- // / \param[in] num_events_in_wait_list Number of events in event_wait_list.
3327
- // / \param[in] event_wait_list Events to wait on.
3328
- // / \param[out] event Event for when all events in event_wait_list have finished
3329
- // / or, if event_wait_list is empty, when all previous events in the queue have
3330
- // / finished.
3331
- // /
3332
- // / \return TBD
3333
- pi_result cuda_piEnqueueEventsWaitWithBarrier (pi_queue, pi_uint32,
3334
- const pi_event *, pi_event *) {
3335
- cl::sycl::detail::pi::die (
3336
- " cuda_piEnqueueEventsWaitWithBarrier not implemented" );
3337
- return {};
3338
- }
3339
-
3340
3346
// / Gets the native CUDA handle of a PI event object
3341
3347
// /
3342
3348
// / \param[in] event The PI event to get the native CUDA object of.
0 commit comments