Skip to content

Commit

Permalink
Destroy distributed client before service to avoid shutdown errors.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 679005510
  • Loading branch information
Google-ML-Automation committed Sep 26, 2024
1 parent 7e2ff2b commit a61fd94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xla/tools/multihost_hlo_runner/create_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ limitations under the License.
namespace xla {

struct PjRtEnvironment {
std::unique_ptr<xla::PjRtClient> client;
// Sequence matters here, client should be destroyed before service.
std::unique_ptr<xla::DistributedRuntimeService> service;
std::unique_ptr<xla::PjRtClient> client;
std::shared_ptr<xla::KeyValueStoreInterface> kv_store;
std::shared_ptr<xla::DistributedRuntimeClient> distributed_client;
};
Expand Down

0 comments on commit a61fd94

Please sign in to comment.