Fixing merge conflict from #21619 + #21653. (#21751)
diff --git a/runtime/src/iree/hal/cts/queue_host_call_test.h b/runtime/src/iree/hal/cts/queue_host_call_test.h
index 49e0dc1..fda974c 100644
--- a/runtime/src/iree/hal/cts/queue_host_call_test.h
+++ b/runtime/src/iree/hal/cts/queue_host_call_test.h
@@ -31,7 +31,8 @@
for (size_t i = 0; i < initial_values.size(); ++i) {
iree_hal_semaphore_t* semaphore = NULL;
IREE_EXPECT_OK(iree_hal_semaphore_create(
- device, initial_values[i], IREE_HAL_SEMAPHORE_FLAG_NONE, &semaphore));
+ device, IREE_HAL_QUEUE_AFFINITY_ANY, initial_values[i],
+ IREE_HAL_SEMAPHORE_FLAG_NONE, &semaphore));
semaphores.push_back(semaphore);
}
payload_values = desired_values;
@@ -148,7 +149,8 @@
signal_semaphore_list, call, args, IREE_HAL_HOST_CALL_FLAG_NONE));
IREE_EXPECT_OK(iree_hal_semaphore_list_wait(signal_semaphore_list,
- iree_make_timeout_ms(5000)));
+ iree_make_timeout_ms(5000),
+ IREE_HAL_WAIT_FLAG_DEFAULT));
EXPECT_EQ(state.did_call, 1);
EXPECT_EQ(state.args[0], args[0]);
@@ -189,7 +191,8 @@
// Wait for completion - the host call should complete quickly.
IREE_EXPECT_OK(iree_hal_semaphore_list_wait(signal_semaphore_list,
- iree_make_timeout_ms(5000)));
+ iree_make_timeout_ms(5000),
+ IREE_HAL_WAIT_FLAG_DEFAULT));
EXPECT_EQ(state.did_call, 1);
EXPECT_EQ(state.args[0], args[0]);
@@ -243,9 +246,11 @@
// callback having executed, but it's hard to verify that. Instead we just
// wait for the signal and then wait again to join the thread.
IREE_EXPECT_OK(iree_hal_semaphore_list_wait(signal_semaphore_list,
- iree_make_timeout_ms(5000)));
+ iree_make_timeout_ms(5000),
+ IREE_HAL_WAIT_FLAG_DEFAULT));
IREE_EXPECT_OK(iree_hal_semaphore_list_wait(state.sideband_semaphore_list,
- iree_make_timeout_ms(5000)));
+ iree_make_timeout_ms(5000),
+ IREE_HAL_WAIT_FLAG_DEFAULT));
EXPECT_EQ(state.did_call, 1);
EXPECT_FALSE(state.received_semaphores)
@@ -312,7 +317,8 @@
// Now wait for the semaphores to be signaled by the thread.
IREE_EXPECT_OK(iree_hal_semaphore_list_wait(signal_semaphore_list,
- iree_make_timeout_ms(5000)));
+ iree_make_timeout_ms(5000),
+ IREE_HAL_WAIT_FLAG_DEFAULT));
EXPECT_EQ(state.did_call, 1);
EXPECT_TRUE(state.thread_started);
@@ -357,7 +363,8 @@
// Wait for semaphores - this should fail because the callback returned an
// error.
EXPECT_THAT(Status(iree_hal_semaphore_list_wait(signal_semaphore_list,
- iree_make_timeout_ms(5000))),
+ iree_make_timeout_ms(5000),
+ IREE_HAL_WAIT_FLAG_DEFAULT)),
StatusIs(StatusCode::kAborted));
// Query individual semaphores to verify they're in error state.
@@ -421,7 +428,8 @@
// Wait for signal semaphores - this should fail because the callback
// returned an error after waiting.
EXPECT_THAT(Status(iree_hal_semaphore_list_wait(signal_semaphore_list,
- iree_make_timeout_ms(5000))),
+ iree_make_timeout_ms(5000),
+ IREE_HAL_WAIT_FLAG_DEFAULT)),
StatusIs(StatusCode::kAborted));
// Verify the callback was called after waiting.
diff --git a/runtime/src/iree/hal/drivers/local_sync/sync_device.c b/runtime/src/iree/hal/drivers/local_sync/sync_device.c
index 7f5e2bb..f89cfdd 100644
--- a/runtime/src/iree/hal/drivers/local_sync/sync_device.c
+++ b/runtime/src/iree/hal/drivers/local_sync/sync_device.c
@@ -369,8 +369,9 @@
iree_hal_host_call_t call, const uint64_t args[4],
iree_hal_host_call_flags_t flags) {
// Wait for all dependencies.
- IREE_RETURN_IF_ERROR(iree_hal_semaphore_list_wait(wait_semaphore_list,
- iree_infinite_timeout()));
+ IREE_RETURN_IF_ERROR(
+ iree_hal_semaphore_list_wait(wait_semaphore_list, iree_infinite_timeout(),
+ IREE_HAL_WAIT_FLAG_DEFAULT));
// If non-blocking then immediately signal the dependencies instead of letting
// the call do it. We don't expect this to allow more work to proceed in the
diff --git a/runtime/src/iree/hal/utils/queue_host_call_emulation.c b/runtime/src/iree/hal/utils/queue_host_call_emulation.c
index 8241c90..e8dc6a6 100644
--- a/runtime/src/iree/hal/utils/queue_host_call_emulation.c
+++ b/runtime/src/iree/hal/utils/queue_host_call_emulation.c
@@ -91,7 +91,8 @@
// Wait for all semaphores to be reached.
iree_status_t status = iree_hal_semaphore_list_wait(
- state->wait_semaphore_list, iree_infinite_timeout());
+ state->wait_semaphore_list, iree_infinite_timeout(),
+ IREE_HAL_WAIT_FLAG_DEFAULT);
// Release wait semaphores early.
iree_hal_semaphore_list_release(state->wait_semaphore_list);