Skip to content

Commit 3ba0911

Browse files
RossBruntonkbenzie
authored andcommitted
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 44a325b commit 3ba0911

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

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)