@@ -276,15 +276,13 @@ _pi_event::_pi_event(pi_command_type type, pi_context context, pi_queue queue)
276
276
isStarted_{false }, evEnd_{nullptr }, evStart_{nullptr }, evQueued_{nullptr },
277
277
queue_{queue}, context_{context} {
278
278
279
- if (type != PI_COMMAND_TYPE_USER) {
280
- PI_CHECK_ERROR (cuEventCreate (&evEnd_, CU_EVENT_DEFAULT));
279
+ assert (type != PI_COMMAND_TYPE_USER);
281
280
282
- if (queue_->properties_ & PI_QUEUE_PROFILING_ENABLE) {
283
- PI_CHECK_ERROR (cuEventCreate (&evQueued_, CU_EVENT_DEFAULT));
284
- PI_CHECK_ERROR (cuEventCreate (&evStart_, CU_EVENT_DEFAULT));
285
- }
286
- } else {
287
- cl::sycl::detail::pi::die (" User-defined events not implemented" );
281
+ PI_CHECK_ERROR (cuEventCreate (&evEnd_, CU_EVENT_DEFAULT));
282
+
283
+ if (queue_->properties_ & PI_QUEUE_PROFILING_ENABLE) {
284
+ PI_CHECK_ERROR (cuEventCreate (&evQueued_, CU_EVENT_DEFAULT));
285
+ PI_CHECK_ERROR (cuEventCreate (&evStart_, CU_EVENT_DEFAULT));
288
286
}
289
287
290
288
if (queue_ != nullptr ) {
@@ -2622,24 +2620,7 @@ pi_result cuda_piextKernelSetArgPointer(pi_kernel kernel, pi_uint32 arg_index,
2622
2620
// Events
2623
2621
//
2624
2622
pi_result cuda_piEventCreate (pi_context context, pi_event *event) {
2625
- assert (context != nullptr );
2626
- assert (event != nullptr );
2627
- pi_result retErr = PI_SUCCESS;
2628
- pi_event retEvent = nullptr ;
2629
-
2630
- try {
2631
- retEvent = _pi_event::make_user (context);
2632
- if (retEvent == nullptr ) {
2633
- retErr = PI_OUT_OF_HOST_MEMORY;
2634
- }
2635
- } catch (pi_result err) {
2636
- retErr = err;
2637
- } catch (...) {
2638
- retErr = PI_OUT_OF_RESOURCES;
2639
- }
2640
-
2641
- *event = retEvent;
2642
- return retErr;
2623
+ cl::sycl::detail::pi::die (" PI Event Create not implemented in CUDA backend" );
2643
2624
}
2644
2625
2645
2626
pi_result cuda_piEventGetInfo (pi_event event, pi_event_info param_name,
@@ -2703,13 +2684,13 @@ pi_result cuda_piEventSetCallback(pi_event event,
2703
2684
pi_int32 command_exec_callback_type,
2704
2685
pfn_notify notify, void *user_data) {
2705
2686
2706
- cl::sycl::detail::pi::die (" Event Callback not implemented" );
2687
+ cl::sycl::detail::pi::die (" Event Callback not implemented in CUDA backend " );
2707
2688
return PI_SUCCESS;
2708
2689
}
2709
2690
2710
2691
pi_result cuda_piEventSetStatus (pi_event event, pi_int32 execution_status) {
2711
2692
2712
- cl::sycl::detail::pi::die (" Event Set Status not implemented" );
2693
+ cl::sycl::detail::pi::die (" Event Set Status not implemented in CUDA backend " );
2713
2694
return PI_INVALID_VALUE;
2714
2695
}
2715
2696
0 commit comments