Skip to content

Commit

Permalink
update openxla-pin to head of Apr24
Browse files Browse the repository at this point in the history
  • Loading branch information
ManfeiBai committed Apr 25, 2024
1 parent 8f7d022 commit c5c994a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions torch_xla/csrc/runtime/ifrt_computation_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ std::string IfrtComputationClient::IfrtDeviceToString(
xla::ifrt::Device* const device) const {
std::string platform =
absl::AsciiStrToUpper(device->client()->platform_name());
int ordinal = global_ordinals_.at(device->id());
int ordinal = global_ordinals_.at(device->Id());
std::string str = absl::StrFormat("%s:%d", platform, ordinal);
return str;
}
Expand Down Expand Up @@ -126,9 +126,9 @@ IfrtComputationClient::IfrtComputationClient() {
std::vector<xla::ifrt::Device*> ordered_devices(client_->device_count());
std::partial_sort_copy(client_->devices().begin(), client_->devices().end(),
ordered_devices.begin(), ordered_devices.end(),
[](auto& a, auto& b) { return a->id() < b->id(); });
[](auto& a, auto& b) { return a->Id() < b->Id(); });
for (auto* device : ordered_devices) {
global_ordinals_[device->id()] = global_ordinals_.size();
global_ordinals_[device->Id()] = global_ordinals_.size();
std::string device_str = IfrtDeviceToString(device);
string_to_device_.emplace(device_str, device);
}
Expand Down

0 comments on commit c5c994a

Please sign in to comment.