@@ -276,15 +276,13 @@ _pi_event::_pi_event(pi_command_type type, pi_context context, pi_queue queue)
276276 isStarted_{false }, evEnd_{nullptr }, evStart_{nullptr }, evQueued_{nullptr },
277277 queue_{queue}, context_{context} {
278278
279- if (type != PI_COMMAND_TYPE_USER) {
280- PI_CHECK_ERROR (cuEventCreate (&evEnd_, CU_EVENT_DEFAULT));
279+ assert (type != PI_COMMAND_TYPE_USER);
281280
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));
288286 }
289287
290288 if (queue_ != nullptr ) {
@@ -2622,24 +2620,7 @@ pi_result cuda_piextKernelSetArgPointer(pi_kernel kernel, pi_uint32 arg_index,
26222620// Events
26232621//
26242622pi_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" );
26432624}
26442625
26452626pi_result cuda_piEventGetInfo (pi_event event, pi_event_info param_name,
@@ -2703,13 +2684,13 @@ pi_result cuda_piEventSetCallback(pi_event event,
27032684 pi_int32 command_exec_callback_type,
27042685 pfn_notify notify, void *user_data) {
27052686
2706- cl::sycl::detail::pi::die (" Event Callback not implemented" );
2687+ cl::sycl::detail::pi::die (" Event Callback not implemented in CUDA backend " );
27072688 return PI_SUCCESS;
27082689}
27092690
27102691pi_result cuda_piEventSetStatus (pi_event event, pi_int32 execution_status) {
27112692
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 " );
27132694 return PI_INVALID_VALUE;
27142695}
27152696
0 commit comments