Skip to content

Commit b1c2ce6

Browse files
junwhanahntensorflower-gardener
authored andcommitted
Fix an IFRT Proxy version compatibility bug introduced by ExecuteOptions::fill_status
Since `fill_status` was implicitly true before the field was introduced, we should have overridden the `fill_status` from the deserialized options. Without that, the client->server behaves incorrectly when the client is old (doesn't set `fill_status` but expects the future to be populated by the server) but the server is new (has `fill_status` in the proto and assumes that the client set it to false). PiperOrigin-RevId: 681247988
1 parent 5f0a3c4 commit b1c2ce6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

third_party/xla/xla/python/ifrt_proxy/server/ifrt_backend.cc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,12 @@ IfrtBackend::HandleLoadedExecutableExecuteRequest(
10581058
TF_ASSIGN_OR_RETURN(auto execute_options,
10591059
xla::ifrt::LoadedExecutable::ExecuteOptions::FromProto(
10601060
execute.execute_options()));
1061+
// Force the old behavior where `fill_status` was implicitly true before
1062+
// protocol version 6. Can be cleaned up once version 6 is outside the
1063+
// compatibility window.
1064+
if (version_.protocol_version() < 6) {
1065+
execute_options.fill_status = true;
1066+
}
10611067

10621068
std::optional<tsl::RCReference<DeviceList>> devices;
10631069
if (!execute.device_ids().empty()) {

0 commit comments

Comments
 (0)