[llvm] [libsycl] add sycl::event and wait functionality to event & queue (PR #188793)
Yury Plyakhin via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 3 11:56:35 PDT 2026
================
@@ -0,0 +1,36 @@
+//===----------------------------------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <detail/event_impl.hpp>
+#include <detail/platform_impl.hpp>
+
+_LIBSYCL_BEGIN_NAMESPACE_SYCL
+
+namespace detail {
+
+EventImpl::~EventImpl() {
+ if (MOffloadEvent)
+ std::ignore = olDestroyEvent(MOffloadEvent);
+}
+
+backend EventImpl::getBackend() const noexcept {
+ // TODO: to handle default constructed.
+ return MPlatform.getBackend();
+}
+
+void EventImpl::wait() {
+ // MOffloadEvent == nullptr when the event is default constructed. Default
+ // constructed event is immediately ready.
----------------
YuriPlyakhin wrote:
I did not find default constructors for EventImpl or event. What is the case when MOffloadEvent is nullptr?
https://github.com/llvm/llvm-project/pull/188793
More information about the llvm-commits
mailing list