Skip to content

Commit a37449a

Browse files
authored
[UR][Offload] Enable olDestroyEvent (#19526)
The issue causing the crash upstream has been fixed (it was an unhandled llvm::Error), so we can now delete events properly.
1 parent ff512f5 commit a37449a

File tree

1 file changed

+4
-6
lines changed
  • unified-runtime/source/adapters/offload

1 file changed

+4
-6
lines changed

unified-runtime/source/adapters/offload/event.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,10 @@ UR_APIEXPORT ur_result_t UR_APICALL urEventRetain(ur_event_handle_t hEvent) {
5757

5858
UR_APIEXPORT ur_result_t UR_APICALL urEventRelease(ur_event_handle_t hEvent) {
5959
if (--hEvent->RefCount == 0) {
60-
// There's a small bug in olDestroyEvent that will crash. Leak the event
61-
// in the meantime.
62-
// auto Res = olDestroyEvent(hEvent->OffloadEvent);
63-
// if (Res) {
64-
// return offloadResultToUR(Res);
65-
// }
60+
auto Res = olDestroyEvent(hEvent->OffloadEvent);
61+
if (Res) {
62+
return offloadResultToUR(Res);
63+
}
6664
}
6765

6866
delete hEvent;

0 commit comments

Comments
 (0)