Skip to content

Commit 9b8bba8

Browse files
authored
[hip] Fixed a busy wait in event_semaphore. (#19540)
Because of how locks were scheduled in iree_hal_hip_semaphore_wait we would run scheduled callbacks after preparing our notification but before waiting on it. However in running the scheduled callbacks it would unconditionally post to the notification. This change only posts to the notification if there was any forward progress made. --------- Signed-off-by: Andrew Woloszyn <[email protected]>
1 parent 604cba8 commit 9b8bba8

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

runtime/src/iree/hal/drivers/hip/event_semaphore.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -842,10 +842,6 @@ static iree_status_t iree_hal_hip_semaphore_wait(
842842
iree_notification_prepare_wait(&semaphore->state_notification);
843843
iree_slim_mutex_unlock(&semaphore->mutex);
844844

845-
// We are going to pick up the correct status from query_locked below.
846-
iree_status_ignore(
847-
iree_hal_hip_event_semaphore_run_scheduled_callbacks(base_semaphore));
848-
849845
// We have to wait for the semaphore to catch up.
850846
bool committed =
851847
iree_notification_commit_wait(&semaphore->state_notification, wait,

0 commit comments

Comments
 (0)