From fdfba2f1f7acf566516d91945df3c6b8ff66d541 Mon Sep 17 00:00:00 2001 From: Konrad Kusiak Date: Tue, 17 Dec 2024 10:08:53 +0000 Subject: [PATCH 1/2] Made assertion on NewEvent instead of if statement --- sycl/source/detail/graph_impl.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sycl/source/detail/graph_impl.cpp b/sycl/source/detail/graph_impl.cpp index 4f8ce5e21d9de..8c2beab438c29 100644 --- a/sycl/source/detail/graph_impl.cpp +++ b/sycl/source/detail/graph_impl.cpp @@ -1000,6 +1000,7 @@ exec_graph_impl::enqueue(const std::shared_ptr &Queue, } NewEvent = CreateNewEvent(); + assert(NewEvent); ur_event_handle_t UREvent = nullptr; // Merge requirements from the nodes into requirements (if any) from the // handler. @@ -1011,10 +1012,8 @@ exec_graph_impl::enqueue(const std::shared_ptr &Queue, // If we have no requirements or dependent events for the command buffer, // enqueue it directly if (CGData.MRequirements.empty() && CGData.MEvents.empty()) { - if (NewEvent != nullptr) { - NewEvent->setSubmissionTime(); - NewEvent->setHostEnqueueTime(); - } + NewEvent->setSubmissionTime(); + NewEvent->setHostEnqueueTime(); ur_result_t Res = Queue->getAdapter() ->call_nocheck< From a11b1784c2242b3d59b3cbcbb43018b696cdfdf5 Mon Sep 17 00:00:00 2001 From: Konrad Kusiak Date: Thu, 19 Dec 2024 09:35:30 +0000 Subject: [PATCH 2/2] Removed assert --- sycl/source/detail/graph_impl.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/sycl/source/detail/graph_impl.cpp b/sycl/source/detail/graph_impl.cpp index 8c2beab438c29..c2cc22a84a00b 100644 --- a/sycl/source/detail/graph_impl.cpp +++ b/sycl/source/detail/graph_impl.cpp @@ -1000,7 +1000,6 @@ exec_graph_impl::enqueue(const std::shared_ptr &Queue, } NewEvent = CreateNewEvent(); - assert(NewEvent); ur_event_handle_t UREvent = nullptr; // Merge requirements from the nodes into requirements (if any) from the // handler.