Skip to content

Commit 1048005

Browse files
Update XLA to a 2025/5/13 revision. (#9155)
Co-authored-by: Zhanyong Wan <[email protected]>
1 parent 80f6471 commit 1048005

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ new_local_repository(
4444

4545
############################# OpenXLA Setup ###############################
4646

47-
# To build PyTorch/XLA with OpenXLA to a new revision, update following xla_hash to
48-
# the openxla git commit hash.
49-
xla_hash = '509f93bf49818a9998c0929fbe57fd0baed3ede9'
47+
# To build PyTorch/XLA with a new revison of OpenXLA, update the xla_hash to
48+
# the openxla git commit hash and note the date of the commit.
49+
xla_hash = '37b580d0dd7b52e611430d33424159719e363ffc' # Committed on 2025/5/13.
5050

5151
http_archive(
5252
name = "xla",

torch_xla/csrc/runtime/ifrt_computation_client.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ std::vector<xla::Literal> IfrtComputationClient::TransferFromDevice(
430430
std::vector<xla::Literal> literals;
431431
literals.reserve(handles.size());
432432
int64_t total_size = 0;
433-
for (auto handle : handles) {
433+
for (const auto& handle : handles) {
434434
// Use XLA replication to reassemble the sharded data. If input handle
435435
// is not sharded, then it is a no-op.
436436
auto ifrt_data = std::dynamic_pointer_cast<IfrtData>(handle);
@@ -501,9 +501,9 @@ std::vector<ComputationClient::ComputationPtr> IfrtComputationClient::Compile(
501501
mlir::ModuleOp::create(mlir::UnknownLoc::get(&context));
502502
torch_xla::ConvertHloToStableHlo(instance.computation.mutable_proto(),
503503
&mlir_module);
504-
std::unique_ptr<xla::ifrt::LoadedExecutable> executable =
504+
std::shared_ptr<xla::ifrt::LoadedExecutable> executable =
505505
ConsumeValue(client_->GetDefaultCompiler()->Compile(
506-
std::make_unique<xla::ifrt::HloProgram>(std::move(mlir_module)),
506+
std::make_unique<xla::ifrt::HloProgram>(mlir_module),
507507
std::make_unique<xla::ifrt::XlaCompileOptions>(compile_options,
508508
devices_list)));
509509
StableHloCompileCounter()->AddValue(1);

torch_xla/csrc/runtime/ifrt_computation_client.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,13 @@ class IfrtComputationClient : public ComputationClient {
253253
struct IfrtComputation : public Computation {
254254
IfrtComputation(xla::XlaComputation computation,
255255
std::vector<std::string> devices,
256-
std::unique_ptr<xla::ifrt::LoadedExecutable> executable)
256+
std::shared_ptr<xla::ifrt::LoadedExecutable> executable)
257257
: Computation(std::move(computation), std::move(devices)),
258258
executable(std::move(executable)) {
259259
output_shardings_ = this->executable->GetOutputShardings();
260260
}
261261

262-
std::unique_ptr<xla::ifrt::LoadedExecutable> executable;
262+
std::shared_ptr<xla::ifrt::LoadedExecutable> executable;
263263
std::optional<std::vector<xla::OpSharding>> output_shardings_;
264264
};
265265
};

0 commit comments

Comments
 (0)