Skip to content

Commit

Permalink
Update XLA pin to 2023/08/08 (pytorch#5427)
Browse files Browse the repository at this point in the history
* Update XLA pin to 2023/08/08

* Update pin one more time to pass a gs file system bug

* manually add gcs to our dep

* fix cpp test build
  • Loading branch information
JackCaoG authored Aug 16, 2023
1 parent 941a4c4 commit 0b311d0
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ http_archive(
"//openxla_patches:gpu_race_condition.diff",
"//openxla_patches:constexpr_return.diff",
],
strip_prefix = "xla-9b339c6fa10f6e964e21b58e40217661f7824bae",
strip_prefix = "xla-cd2cf5c34931e4fc1cacf83bfc480a5b93f05f6d",
urls = [
"https://github.com/openxla/xla/archive/9b339c6fa10f6e964e21b58e40217661f7824bae.tar.gz",
"https://github.com/openxla/xla/archive/cd2cf5c34931e4fc1cacf83bfc480a5b93f05f6d.tar.gz",
],
)

Expand Down
2 changes: 1 addition & 1 deletion bazel/rules_def.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def ptxla_cc_test(
**kwargs):
xla_cc_test(
linkstatic = True,
extra_copts = copts + [
copts = copts + [
"-isystemexternal/torch", # Required for system includes.
"-fexceptions", # Required for testing crashes.
],
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@

base_dir = os.path.dirname(os.path.abspath(__file__))

_libtpu_version = '0.1.dev20230703'
_libtpu_version = '0.1.dev20230809'
_libtpu_storage_path = f'https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/wheels/libtpu-nightly/libtpu_nightly-{_libtpu_version}-py3-none-any.whl'


Expand Down
9 changes: 4 additions & 5 deletions torch_xla/csrc/init_python_bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1628,12 +1628,11 @@ void InitXlaModuleBindings(py::module m) {
XLA_CHECK(num_nodes > 0)
<< "num_nodes must be positive: " << num_nodes;

xla::DistributedRuntimeServiceImpl::Options options;
xla::CoordinationServiceImpl::Options options;
options.num_nodes = num_nodes;
return std::move(xla::GetDistributedRuntimeService(
dist_service_addr, options,
/*use_coordination_service=*/false)
.value());
return std::move(
xla::GetDistributedRuntimeService(dist_service_addr, options)
.value());
});

BuildProfilerSubmodule(&m);
Expand Down
1 change: 1 addition & 0 deletions torch_xla/csrc/runtime/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ cc_library(
"@xla//xla/pjrt:tfrt_cpu_pjrt_client",
"@xla//xla/pjrt:pjrt_c_api_client",
"@tsl//tsl/profiler/lib:traceme",
"@tsl//tsl/platform/cloud:gcs_file_system",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/types:span",
],
Expand Down
6 changes: 2 additions & 4 deletions torch_xla/csrc/runtime/pjrt_computation_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "xla/pjrt/tfrt_cpu_pjrt_client.h"
#include "xla/pjrt/tpu_client.h"
#include "xla/shape.h"
#include "xla/stream_executor/tpu/tpu_initializer_helper.h"
#include "xla/stream_executor/tpu/tpu_initializer_framework_helper.h"

using xla::internal::XlaBuilderFriend;

Expand All @@ -49,9 +49,7 @@ MaybeInitializeDistributedRuntimeClient(int local_rank,
xla::DistributedRuntimeClient::Options options;
/* TODO(jonbolin): Use global rank for multi-host setup */
options.node_id = local_rank;
client =
xla::GetDistributedRuntimeClient(dist_service_addr, options,
/*use_coordination_service=*/false);
client = xla::GetDistributedRuntimeClient(dist_service_addr, options);
XLA_CHECK(client->Connect().ok())
<< "Failed to initialize distributed runtime client";
}
Expand Down

0 comments on commit 0b311d0

Please sign in to comment.