DPC++ Runtime
Runtime libraries for oneAPI DPC++
event_impl.cpp
Go to the documentation of this file.
1 //==---------------- event_impl.cpp - SYCL event ---------------------------==//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #include <detail/event_impl.hpp>
10 #include <detail/event_info.hpp>
11 #include <detail/plugin.hpp>
12 #include <detail/queue_impl.hpp>
14 #include <sycl/context.hpp>
15 #include <sycl/device_selector.hpp>
16 
17 #include "detail/config.hpp"
18 
19 #include <chrono>
20 
21 #ifdef XPTI_ENABLE_INSTRUMENTATION
22 #include "xpti/xpti_trace_framework.hpp"
23 #include <atomic>
24 #include <detail/xpti_registry.hpp>
25 #include <sstream>
26 #endif
27 
28 namespace sycl {
30 namespace detail {
31 #ifdef XPTI_ENABLE_INSTRUMENTATION
32 extern xpti::trace_event_data_t *GSYCLGraphEvent;
33 #endif
34 
35 // If we do not yet have a context, use the default one.
36 void event_impl::ensureContextInitialized() {
37  if (MIsContextInitialized)
38  return;
39 
40  if (MHostEvent) {
41  QueueImplPtr HostQueue = Scheduler::getInstance().getDefaultHostQueue();
42  this->setContextImpl(detail::getSyclObjImpl(HostQueue->get_context()));
43  } else {
44  const device &SyclDevice = default_selector().select_device();
45  this->setContextImpl(detail::queue_impl::getDefaultOrNew(
46  detail::getSyclObjImpl(SyclDevice)));
47  }
48 }
49 
50 bool event_impl::is_host() {
51  // Treat all devices that don't support interoperability as host devices to
52  // avoid attempts to call method get on such events.
53  return MHostEvent;
54 }
55 
56 event_impl::~event_impl() {
57  if (MEvent)
59 }
60 
61 void event_impl::waitInternal() {
62  if (!MHostEvent && MEvent) {
63  // Wait for the native event
64  getPlugin().call<PiApiKind::piEventsWait>(1, &MEvent);
65  } else if (MState == HES_Discarded) {
66  // Waiting for the discarded event is invalid
67  throw sycl::exception(
68  make_error_code(errc::invalid),
69  "waitInternal method cannot be used for a discarded event.");
70  } else if (MState != HES_Complete) {
71  // Wait for the host event
72  std::unique_lock<std::mutex> lock(MMutex);
73  cv.wait(lock, [this] { return MState == HES_Complete; });
74  }
75 
76  // Wait for connected events(e.g. streams prints)
77  for (const EventImplPtr &Event : MPostCompleteEvents)
78  Event->wait(Event);
79 }
80 
81 void event_impl::setComplete() {
82  if (MHostEvent || !MEvent) {
83  {
84  std::unique_lock<std::mutex> lock(MMutex);
85 #ifndef NDEBUG
86  int Expected = HES_NotComplete;
87  int Desired = HES_Complete;
88 
89  bool Succeeded = MState.compare_exchange_strong(Expected, Desired);
90 
91  assert(Succeeded && "Unexpected state of event");
92 #else
93  MState.store(static_cast<int>(HES_Complete));
94 #endif
95  }
96  cv.notify_all();
97  return;
98  }
99 
100  assert(false && "setComplete is not supported for non-host event");
101 }
102 
103 const RT::PiEvent &event_impl::getHandleRef() const { return MEvent; }
104 RT::PiEvent &event_impl::getHandleRef() { return MEvent; }
105 
106 const ContextImplPtr &event_impl::getContextImpl() {
107  ensureContextInitialized();
108  return MContext;
109 }
110 
112  ensureContextInitialized();
113  return MContext->getPlugin();
114 }
115 
116 void event_impl::setStateIncomplete() { MState = HES_NotComplete; }
117 
118 void event_impl::setContextImpl(const ContextImplPtr &Context) {
119  MHostEvent = Context->is_host();
120  MContext = Context;
121  MIsContextInitialized = true;
122 }
123 
124 event_impl::event_impl(RT::PiEvent Event, const context &SyclContext)
125  : MIsContextInitialized(true), MEvent(Event),
126  MContext(detail::getSyclObjImpl(SyclContext)), MHostEvent(false),
127  MIsFlushed(true), MState(HES_Complete) {
128 
129  if (MContext->is_host()) {
130  throw sycl::invalid_parameter_error(
131  "The syclContext must match the OpenCL context associated with the "
132  "clEvent.",
133  PI_ERROR_INVALID_CONTEXT);
134  }
135 
136  RT::PiContext TempContext;
138  sizeof(RT::PiContext),
139  &TempContext, nullptr);
140  if (MContext->getHandleRef() != TempContext) {
141  throw sycl::invalid_parameter_error(
142  "The syclContext must match the OpenCL context associated with the "
143  "clEvent.",
144  PI_ERROR_INVALID_CONTEXT);
145  }
146 }
147 
149  : MQueue{Queue},
150  MIsProfilingEnabled{Queue->is_host() || Queue->MIsProfilingEnabled} {
151  this->setContextImpl(Queue->getContextImplPtr());
152 
153  if (Queue->is_host()) {
154  MState.store(HES_NotComplete);
155 
156  if (Queue->has_property<property::queue::enable_profiling>()) {
157  MHostProfilingInfo.reset(new HostProfilingInfo());
158  if (!MHostProfilingInfo)
159  throw runtime_error("Out of host memory", PI_ERROR_OUT_OF_HOST_MEMORY);
160  }
161  return;
162  }
163  MState.store(HES_Complete);
164 }
165 
166 void *event_impl::instrumentationProlog(std::string &Name, int32_t StreamID,
167  uint64_t &IId) const {
168  void *TraceEvent = nullptr;
169 #ifdef XPTI_ENABLE_INSTRUMENTATION
170  if (!xptiTraceEnabled())
171  return TraceEvent;
172  // Use a thread-safe counter to get a unique instance ID for the wait() on the
173  // event
174  static std::atomic<uint64_t> InstanceID = {1};
175  xpti::trace_event_data_t *WaitEvent = nullptr;
176 
177  // Create a string with the event address so it
178  // can be associated with other debug data
179  xpti::utils::StringHelper SH;
180  Name = SH.nameWithAddress<RT::PiEvent>("event.wait", MEvent);
181 
182  // We can emit the wait associated with the graph if the
183  // event does not have a command object or associated with
184  // the command object, if it exists
185  if (MCommand) {
186  Command *Cmd = (Command *)MCommand;
187  WaitEvent = Cmd->MTraceEvent ? static_cast<xpti_td *>(Cmd->MTraceEvent)
188  : GSYCLGraphEvent;
189  } else
190  WaitEvent = GSYCLGraphEvent;
191 
192  // Record the current instance ID for use by Epilog
193  IId = InstanceID++;
194  xptiNotifySubscribers(StreamID, xpti::trace_wait_begin, nullptr, WaitEvent,
195  IId, static_cast<const void *>(Name.c_str()));
196  TraceEvent = (void *)WaitEvent;
197 #endif
198  return TraceEvent;
199 }
200 
201 void event_impl::instrumentationEpilog(void *TelemetryEvent,
202  const std::string &Name,
203  int32_t StreamID, uint64_t IId) const {
204 #ifdef XPTI_ENABLE_INSTRUMENTATION
205  if (!(xptiTraceEnabled() && TelemetryEvent))
206  return;
207  // Close the wait() scope
208  xpti::trace_event_data_t *TraceEvent =
209  (xpti::trace_event_data_t *)TelemetryEvent;
210  xptiNotifySubscribers(StreamID, xpti::trace_wait_end, nullptr, TraceEvent,
211  IId, static_cast<const void *>(Name.c_str()));
212 #endif
213 }
214 
215 void event_impl::wait(std::shared_ptr<sycl::detail::event_impl> Self) {
216  if (MState == HES_Discarded)
217  throw sycl::exception(make_error_code(errc::invalid),
218  "wait method cannot be used for a discarded event.");
219 
220 #ifdef XPTI_ENABLE_INSTRUMENTATION
221  void *TelemetryEvent = nullptr;
222  uint64_t IId;
223  std::string Name;
224  int32_t StreamID = xptiRegisterStream(SYCL_STREAM_NAME);
225  TelemetryEvent = instrumentationProlog(Name, StreamID, IId);
226 #endif
227 
228  if (MEvent)
229  // presence of MEvent means the command has been enqueued, so no need to
230  // go via the slow path event waiting in the scheduler
231  waitInternal();
232  else if (MCommand)
234 
235 #ifdef XPTI_ENABLE_INSTRUMENTATION
236  instrumentationEpilog(TelemetryEvent, Name, StreamID, IId);
237 #endif
238 }
239 
241  std::shared_ptr<sycl::detail::event_impl> Self) {
242  wait(Self);
243 
244  if (QueueImplPtr SubmittedQueue = MSubmittedQueue.lock())
245  SubmittedQueue->throw_asynchronous();
246 }
247 
249  std::weak_ptr<queue_impl> EmptyPtr;
250 
251  if (!EmptyPtr.owner_before(MQueue) && !MQueue.owner_before(EmptyPtr)) {
252  throw sycl::exception(make_error_code(sycl::errc::invalid),
253  "Profiling information is unavailable as the event "
254  "has no associated queue.");
255  }
256  if (!MIsProfilingEnabled) {
257  throw sycl::exception(
258  make_error_code(sycl::errc::invalid),
259  "Profiling information is unavailable as the queue associated with "
260  "the event does not have the 'enable_profiling' property.");
261  }
262 }
263 
264 template <>
265 uint64_t
266 event_impl::get_profiling_info<info::event_profiling::command_submit>() {
267  checkProfilingPreconditions();
268  return MSubmitTime;
269 }
270 
271 template <>
272 uint64_t
273 event_impl::get_profiling_info<info::event_profiling::command_start>() {
274  checkProfilingPreconditions();
275  if (!MHostEvent) {
276  if (MEvent)
277  return get_event_profiling_info<info::event_profiling::command_start>(
278  this->getHandleRef(), this->getPlugin());
279  return 0;
280  }
281  if (!MHostProfilingInfo)
282  throw invalid_object_error("Profiling info is not available.",
283  PI_ERROR_PROFILING_INFO_NOT_AVAILABLE);
284  return MHostProfilingInfo->getStartTime();
285 }
286 
287 template <>
288 uint64_t event_impl::get_profiling_info<info::event_profiling::command_end>() {
289  checkProfilingPreconditions();
290  if (!MHostEvent) {
291  if (MEvent)
292  return get_event_profiling_info<info::event_profiling::command_end>(
293  this->getHandleRef(), this->getPlugin());
294  return 0;
295  }
296  if (!MHostProfilingInfo)
297  throw invalid_object_error("Profiling info is not available.",
298  PI_ERROR_PROFILING_INFO_NOT_AVAILABLE);
299  return MHostProfilingInfo->getEndTime();
300 }
301 
302 template <> uint32_t event_impl::get_info<info::event::reference_count>() {
303  if (!MHostEvent && MEvent) {
304  return get_event_info<info::event::reference_count>(this->getHandleRef(),
305  this->getPlugin());
306  }
307  return 0;
308 }
309 
310 template <>
312 event_impl::get_info<info::event::command_execution_status>() {
313  if (MState == HES_Discarded)
315 
316  if (!MHostEvent) {
317  // Command is enqueued and PiEvent is ready
318  if (MEvent)
319  return get_event_info<info::event::command_execution_status>(
320  this->getHandleRef(), this->getPlugin());
321  // Command is blocked and not enqueued, PiEvent is not assigned yet
322  else if (MCommand)
323  return sycl::info::event_command_status::submitted;
324  }
325 
326  return MHostEvent && MState.load() != HES_Complete
327  ? sycl::info::event_command_status::submitted
329 }
330 
331 static uint64_t getTimestamp() {
332  auto TimeStamp = std::chrono::high_resolution_clock::now().time_since_epoch();
333  return std::chrono::duration_cast<std::chrono::nanoseconds>(TimeStamp)
334  .count();
335 }
336 
337 void HostProfilingInfo::start() { StartTime = getTimestamp(); }
338 
339 void HostProfilingInfo::end() { EndTime = getTimestamp(); }
340 
343 
344  auto Plugin = getPlugin();
345  if (!MIsInitialized) {
346  MIsInitialized = true;
347  auto TempContext = MContext.get()->getHandleRef();
348  Plugin.call<PiApiKind::piEventCreate>(TempContext, &MEvent);
349  }
350  if (Plugin.getBackend() == backend::opencl)
351  Plugin.call<PiApiKind::piEventRetain>(getHandleRef());
352  pi_native_handle Handle;
353  Plugin.call<PiApiKind::piextEventGetNativeHandle>(getHandleRef(), &Handle);
354  return Handle;
355 }
356 
357 std::vector<EventImplPtr> event_impl::getWaitList() {
358  if (MState == HES_Discarded)
359  throw sycl::exception(
361  "get_wait_list() cannot be used for a discarded event.");
362 
363  std::lock_guard<std::mutex> Lock(MMutex);
364 
365  std::vector<EventImplPtr> Result;
366  Result.reserve(MPreparedDepsEvents.size() + MPreparedHostDepsEvents.size());
367  Result.insert(Result.end(), MPreparedDepsEvents.begin(),
368  MPreparedDepsEvents.end());
369  Result.insert(Result.end(), MPreparedHostDepsEvents.begin(),
371 
372  return Result;
373 }
374 
375 void event_impl::flushIfNeeded(const QueueImplPtr &UserQueue) {
376  // Some events might not have a native handle underneath even at this point,
377  // e.g. those produced by memset with 0 size (no PI call is made).
378  if (MIsFlushed || !MEvent)
379  return;
380 
381  QueueImplPtr Queue = MQueue.lock();
382  // If the queue has been released, all of the commands have already been
383  // implicitly flushed by piQueueRelease.
384  if (!Queue) {
385  MIsFlushed = true;
386  return;
387  }
388  if (Queue == UserQueue)
389  return;
390 
391  // Check if the task for this event has already been submitted.
395  nullptr);
396  if (Status == PI_EVENT_QUEUED) {
397  getPlugin().call<PiApiKind::piQueueFlush>(Queue->getHandleRef());
398  }
399  MIsFlushed = true;
400 }
401 
403  std::lock_guard<std::mutex> Lock(MMutex);
404  MPreparedDepsEvents.clear();
405  MPreparedHostDepsEvents.clear();
406 }
407 
409  std::lock_guard<std::mutex> Lock(MMutex);
410  for (auto &Event : MPreparedDepsEvents) {
411  Event->cleanupDependencyEvents();
412  }
413  for (auto &Event : MPreparedHostDepsEvents) {
414  Event->cleanupDependencyEvents();
415  }
416 }
417 
419  if (!MIsProfilingEnabled)
420  return;
421  if (QueueImplPtr Queue = MQueue.lock()) {
422  try {
423  MSubmitTime = Queue->getDeviceImplPtr()->getCurrentDeviceTime();
424  } catch (feature_not_supported &e) {
425  throw sycl::exception(make_error_code(errc::profiling),
426  std::string("Unable to get command group submission time: ") +
427  e.what());
428  }
429  }
430 }
431 
433 
435  return get_info<info::event::command_execution_status>() ==
437 }
438 
439 } // namespace detail
440 } // __SYCL_INLINE_VER_NAMESPACE(_V1)
441 } // namespace sycl
sycl::_V1::detail::Command
The Command class represents some action that needs to be performed on one or more memory objects.
Definition: commands.hpp:95
piEventRelease
pi_result piEventRelease(pi_event event)
Definition: pi_esimd_emulator.cpp:1485
event_info.hpp
event_impl.hpp
sycl::_V1::detail::event_impl::getWaitList
std::vector< EventImplPtr > getWaitList()
Returns vector of event_impl that this event_impl depends on.
Definition: event_impl.cpp:357
sycl::_V1::detail::SYCL_STREAM_NAME
constexpr const char * SYCL_STREAM_NAME
Definition: xpti_registry.hpp:28
sycl::_V1::detail::HostProfilingInfo::end
void end()
Measures event's end time.
Definition: event_impl.cpp:339
sycl::_V1::detail::event_impl::cleanupDependencyEvents
void cleanupDependencyEvents()
Cleans dependencies of this event_impl.
Definition: event_impl.cpp:402
sycl::_V1::info::event_command_status::complete
@ complete
sycl::_V1::detail::ContextImplPtr
std::shared_ptr< sycl::detail::context_impl > ContextImplPtr
Definition: event_impl.hpp:30
sycl::_V1::detail::getTimestamp
static uint64_t getTimestamp()
Definition: event_impl.cpp:331
sycl::_V1::make_error_code
std::error_code make_error_code(sycl::errc E) noexcept
Constructs an error code using e and sycl_category()
Definition: exception.cpp:91
sycl::_V1::detail::event_impl::setSubmissionTime
void setSubmissionTime()
Calling this function queries the current device timestamp and sets it as submission time for the com...
Definition: event_impl.cpp:418
config.hpp
sycl::_V1::detail::event_impl::MIsInitialized
bool MIsInitialized
Definition: event_impl.hpp:266
device_selector.hpp
sycl::_V1::errc::feature_not_supported
@ feature_not_supported
__SYCL_INLINE_VER_NAMESPACE
#define __SYCL_INLINE_VER_NAMESPACE(X)
Definition: defines_elementary.hpp:11
xpti_registry.hpp
sycl::_V1::detail::event_impl::MEvent
RT::PiEvent MEvent
Definition: event_impl.hpp:268
sycl::_V1::info::event_command_status
event_command_status
Definition: info_desc.hpp:131
PI_EVENT_INFO_CONTEXT
@ PI_EVENT_INFO_CONTEXT
Definition: pi.h:405
sycl::_V1::detail::Scheduler::waitForEvent
void waitForEvent(const EventImplPtr &Event)
Waits for the event.
Definition: scheduler.cpp:256
sycl::_V1::detail::event_impl::instrumentationProlog
void * instrumentationProlog(std::string &Name, int32_t StreamID, uint64_t &instance_id) const
Definition: event_impl.cpp:166
context.hpp
sycl::_V1::detail::event_impl::MCommand
void * MCommand
Definition: event_impl.hpp:274
sycl
---— Error handling, matching OpenCL plugin semantics.
Definition: access.hpp:14
plugin.hpp
queue_impl.hpp
sycl::_V1::detail::getPlugin
static const plugin & getPlugin(backend Backend)
Definition: backend.cpp:32
scheduler.hpp
sycl::_V1::detail::event_impl::getNative
pi_native_handle getNative()
Gets the native handle of the SYCL event.
Definition: event_impl.cpp:341
sycl::_V1::detail::event_impl::ensureContextInitialized
void ensureContextInitialized()
Definition: event_impl.cpp:36
sycl::_V1::detail::pi::getPlugin
const plugin & getPlugin()
Definition: pi.cpp:515
sycl::_V1::detail::event_impl::MQueue
std::weak_ptr< queue_impl > MQueue
Definition: event_impl.hpp:275
sycl::_V1::detail::event_impl::getSubmissionTime
uint64_t getSubmissionTime()
Definition: event_impl.cpp:432
sycl::_V1::detail::event_impl::MContext
ContextImplPtr MContext
Definition: event_impl.hpp:271
sycl::_V1::detail::HostProfilingInfo::start
void start()
Measures event's start time.
Definition: event_impl.cpp:337
sycl::_V1::detail::event_impl::MIsProfilingEnabled
const bool MIsProfilingEnabled
Definition: event_impl.hpp:276
sycl::_V1::detail::event_impl::checkProfilingPreconditions
void checkProfilingPreconditions() const
Definition: event_impl.cpp:248
sycl::_V1::detail::event_impl::MSubmittedQueue
std::weak_ptr< queue_impl > MSubmittedQueue
Definition: event_impl.hpp:279
piEventsWait
pi_result piEventsWait(pi_uint32 num_events, const pi_event *event_list)
Definition: pi_esimd_emulator.cpp:1450
sycl::_V1::detail::plugin
The plugin class provides a unified interface to the underlying low-level runtimes for the device-agn...
Definition: plugin.hpp:90
sycl::_V1::info::event_command_status::ext_oneapi_unknown
@ ext_oneapi_unknown
sycl::_V1::errc::profiling
@ profiling
sycl::_V1::detail::event_impl::wait_and_throw
void wait_and_throw(std::shared_ptr< sycl::detail::event_impl > Self)
Waits for the event.
Definition: event_impl.cpp:240
sycl::_V1::detail::event_impl::getHandleRef
RT::PiEvent & getHandleRef()
Returns raw interoperability event handle.
Definition: event_impl.cpp:103
sycl::_V1::detail::event_impl::flushIfNeeded
void flushIfNeeded(const QueueImplPtr &UserQueue)
Performs a flush on the queue associated with this event if the user queue is different and the task ...
Definition: event_impl.cpp:375
sycl::_V1::detail::event_impl::MSubmitTime
uint64_t MSubmitTime
Definition: event_impl.hpp:270
_pi_event_status
_pi_event_status
Definition: pi.h:143
sycl::_V1::detail::pi::PiContext
::pi_context PiContext
Definition: pi.hpp:128
piEventCreate
decltype(piEventCreate) piEventCreate
Definition: pi_level_zero.cpp:2043
piextEventGetNativeHandle
pi_result piextEventGetNativeHandle(pi_event event, pi_native_handle *nativeHandle)
Gets the native handle of a PI event object.
Definition: pi_esimd_emulator.cpp:1506
sycl::_V1::device
The SYCL device class encapsulates a single SYCL device on which kernels may be executed.
Definition: device.hpp:49
sycl::_V1::detail::EventImplPtr
std::shared_ptr< event_impl > EventImplPtr
Definition: cg.hpp:42
sycl::_V1::detail::event_impl::instrumentationEpilog
void instrumentationEpilog(void *TelementryEvent, const std::string &Name, int32_t StreamID, uint64_t IId) const
Definition: event_impl.cpp:201
sycl::_V1::errc::invalid
@ invalid
pi_native_handle
uintptr_t pi_native_handle
Definition: pi.h:128
sycl::_V1::detail::event_impl::waitInternal
void waitInternal()
Waits for the event with respect to device type.
Definition: event_impl.cpp:61
PI_EVENT_QUEUED
@ PI_EVENT_QUEUED
Definition: pi.h:147
sycl::_V1::detail::event_impl::HES_Discarded
@ HES_Discarded
Definition: event_impl.hpp:41
sycl::_V1::backend::opencl
@ opencl
piEventGetInfo
pi_result piEventGetInfo(pi_event event, pi_event_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret)
Definition: pi_esimd_emulator.cpp:1401
sycl::_V1::detail::Command::MTraceEvent
void * MTraceEvent
The event for node_create and task_begin.
Definition: commands.hpp:317
piEventRetain
pi_result piEventRetain(pi_event event)
Definition: pi_esimd_emulator.cpp:1475
sycl::_V1::detail::plugin::call
void call(ArgsT... Args) const
Calls the API, traces the call, checks the result.
Definition: plugin.hpp:217
sycl::_V1::detail::event_impl::event_impl
event_impl(std::optional< HostEventState > State=HES_Complete)
Constructs a ready SYCL event.
Definition: event_impl.hpp:49
sycl::_V1::detail::event_impl::wait
void wait(std::shared_ptr< sycl::detail::event_impl > Self)
Waits for the event.
Definition: event_impl.cpp:215
sycl::_V1::detail::event_impl::getPlugin
const plugin & getPlugin()
Definition: event_impl.cpp:111
sycl::_V1::detail::QueueImplPtr
std::shared_ptr< sycl::detail::queue_impl > QueueImplPtr
Definition: event_impl.hpp:32
sycl::_V1::detail::Scheduler::getInstance
static Scheduler & getInstance()
Definition: scheduler.cpp:252
sycl::_V1::detail::event_impl::MPreparedDepsEvents
std::vector< EventImplPtr > MPreparedDepsEvents
Dependency events prepared for waiting by backend.
Definition: event_impl.hpp:282
piQueueFlush
pi_result piQueueFlush(pi_queue command_queue)
Definition: pi_esimd_emulator.cpp:1004
sycl::_V1::detail::event_impl::MState
std::atomic< int > MState
Definition: event_impl.hpp:294
PI_EVENT_INFO_COMMAND_EXECUTION_STATUS
@ PI_EVENT_INFO_COMMAND_EXECUTION_STATUS
Definition: pi.h:407
sycl::_V1::detail::event_impl::MIsFlushed
std::atomic< bool > MIsFlushed
Indicates that the task associated with this event has been submitted by the queue to the device.
Definition: event_impl.hpp:289
sycl::_V1::detail::event_impl::MPreparedHostDepsEvents
std::vector< EventImplPtr > MPreparedHostDepsEvents
Definition: event_impl.hpp:283
sycl::_V1::detail::event_impl::cleanDepEventsThroughOneLevel
void cleanDepEventsThroughOneLevel()
Cleans dependencies of this event's dependencies.
Definition: event_impl.cpp:408
sycl::_V1::detail::event_impl::isCompleted
bool isCompleted()
Checks if this event is complete.
Definition: event_impl.cpp:434
sycl::_V1::detail::pi::PiEvent
::pi_event PiEvent
Definition: pi.hpp:136
pi_int32
int32_t pi_int32
Definition: pi.h:123
sycl::_V1::detail::event_impl::MMutex
std::mutex MMutex
Definition: event_impl.hpp:296
sycl::_V1::detail::getSyclObjImpl
decltype(Obj::impl) getSyclObjImpl(const Obj &SyclObject)
Definition: common.hpp:300
sycl::_V1::context
The context class represents a SYCL context on which kernel functions may be executed.
Definition: context.hpp:41