Skip to content

Commit

Permalink
Corrected last event access
Browse files Browse the repository at this point in the history
  • Loading branch information
TejaX-Alaghari committed Jan 29, 2025
1 parent 1d65b38 commit ec7496c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clang/runtime/dpct-rt/include/dpct/device.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,12 @@ class device_ext : public sycl::device {
lock.unlock();
for (const auto &q : current_queues) {
if (q->is_in_order()) {
#if (__SYCL_COMPILER_VERSION && __SYCL_COMPILER_VERSION >= 20250117)
last_events.push_back(
q->ext_oneapi_get_last_event().value_or(std::nullptr));
#else
last_events.push_back(q->ext_oneapi_get_last_event());
#endif
}
}
// Guard the destruct of current_queues to make sure the ref count is safe.
Expand Down

0 comments on commit ec7496c

Please sign in to comment.