Skip to content

Commit d90140f

Browse files
will-cromarManfeiBai
authored andcommitted
Add XLA_SANDBOX_BUILD=1 to experimental build (#4455)
* Add `XLA_SANDBOX_BUILD=1` to experimental build * Update build_torch_xla_libs.sh * Increase shm size in docker build
1 parent dfab969 commit d90140f

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

build_torch_xla_libs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fi
3636

3737
BUILD_STRATEGY="standalone"
3838
if [[ "$XLA_SANDBOX_BUILD" == "1" ]]; then
39-
BUILD_STRATEGY="sandboxed --sandbox_tmpfs_path=/tmp"
39+
BUILD_STRATEGY="sandboxed --sandbox_base=/dev/shm"
4040
else
4141
# We can remove this after https://github.com/bazelbuild/bazel/issues/15359 is resolved
4242
unset CC

docker/experimental/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ RUN cd third_party/tensorflow && find ../../tf_patches -name '*.diff' | xargs -t
7575

7676
COPY build_torch_xla_libs.sh .
7777

78+
# TODO: Remove this when it's not required anymore
79+
ENV XLA_SANDBOX_BUILD=1
80+
7881
ARG tpuvm
7982
ARG tf_cuda_compute_capabilities
8083
ARG bazel_jobs

docker/experimental/cloudbuild.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ steps:
1818
1919
args=(${_BUILD_ARGS//,/ })
2020
flags=(
21+
--shm-size=${_SHM_SIZE}
2122
--build-arg=bazel_jobs=${_BAZEL_JOBS}
2223
--build-arg=python_version=${_PYTHON_VERSION}
2324
# TODO: use current version in setup.py
@@ -125,6 +126,7 @@ substitutions:
125126
_CACHE: 'true'
126127
_CACHE_TTL: '18h'
127128
_BUILD_ARGS: tpuvm=1,cuda=0
129+
_SHM_SIZE: '16gb'
128130
options:
129131
# To run in a test project, either point to your pool or replace this with
130132
# `machineType`. You may have to reduce _BAZEL_JOBS.

0 commit comments

Comments
 (0)