diff --git a/runtime/src/iree/hal/drivers/hip/event_semaphore.c b/runtime/src/iree/hal/drivers/hip/event_semaphore.c index 276290c5f006..b08c4252e09a 100644 --- a/runtime/src/iree/hal/drivers/hip/event_semaphore.c +++ b/runtime/src/iree/hal/drivers/hip/event_semaphore.c @@ -295,6 +295,10 @@ iree_status_t iree_hal_hip_semaphore_multi_wait( // it is because the event has already been signaled to that value. if (!cpu_events[i]) { semaphore_hit = true; + if (iree_hal_hip_semaphore_is_aborted(semaphore_list.semaphores[i])) { + status = iree_make_status(IREE_STATUS_ABORTED, + "the semaphore was aborted"); + } break; } } @@ -842,10 +846,6 @@ static iree_status_t iree_hal_hip_semaphore_wait( iree_notification_prepare_wait(&semaphore->state_notification); iree_slim_mutex_unlock(&semaphore->mutex); - // We are going to pick up the correct status from query_locked below. - iree_status_ignore( - iree_hal_hip_event_semaphore_run_scheduled_callbacks(base_semaphore)); - // We have to wait for the semaphore to catch up. bool committed = iree_notification_commit_wait(&semaphore->state_notification, wait,