File tree 4 files changed +10
-3
lines changed
4 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,12 @@ if [[ "$XLA_BAZEL_VERBOSE" == "1" ]]; then
35
35
fi
36
36
37
37
BUILD_STRATEGY=" standalone"
38
+ SANDBOX_BASE=" ${XLA_SANDBOX_BASE} "
39
+ if [ -z " $XLA_SANDBOX_BASE " ]; then
40
+ SANDBOX_BASE=" /tmp"
41
+ fi
38
42
if [[ " $XLA_SANDBOX_BUILD " == " 1" ]]; then
39
- BUILD_STRATEGY=" sandboxed --sandbox_base=/dev/shm "
43
+ BUILD_STRATEGY=" sandboxed --sandbox_base=${SANDBOX_BASE} "
40
44
else
41
45
# We can remove this after https://github.com/bazelbuild/bazel/issues/15359 is resolved
42
46
unset CC
84
88
cp -r -u -p $THIRD_PARTY_DIR /xla_client $THIRD_PARTY_DIR /tensorflow/tensorflow/compiler/xla/
85
89
86
90
pushd $THIRD_PARTY_DIR /tensorflow
87
- # TensorFlow and its dependencies may introduce warning flags from newer compilers
91
+ # TensorFlow and its dependencies may introduce warning flags from newer compilers
88
92
# that PyTorch and PyTorch/XLA's default compilers don't recognize. They become error
89
93
# while '-Werror' is used. Therefore, surpress the warnings.
90
94
TF_EXTRA_FLAGS=" --copt=-Wno-unknown-warning-option"
Original file line number Diff line number Diff line change @@ -39,8 +39,9 @@ ENV BUNDLE_LIBTPU "${tpuvm}"
39
39
# Maximum number of jobs to use for bazel build
40
40
ENV BAZEL_JOBS "${bazel_jobs}"
41
41
42
- # This makes the bazel build behave more consistently, but it may slower.
42
+ # This makes the bazel build behave more consistently, but runs slower.
43
43
ENV XLA_SANDBOX_BUILD "1"
44
+ ENV XLA_SANDBOX_BASE "/dev/shm"
44
45
45
46
# To get around issue of Cloud Build with recursive submodule update
46
47
# clone recursively from pytorch/xla if building docker image with
Original file line number Diff line number Diff line change 5
5
- name : ' gcr.io/cloud-builders/docker'
6
6
args : [
7
7
' build' ,
8
+ ' --shm-size' , '16gb',
8
9
' --build-arg' , 'base_image=${_DOCKER_BASE_IMAGE}',
9
10
' --build-arg' , 'cuda=${_CUDA}',
10
11
' --build-arg' , 'python_version=${_PYTHON_VERSION}',
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ COPY build_torch_xla_libs.sh .
77
77
78
78
# TODO: Remove this when it's not required anymore
79
79
ENV XLA_SANDBOX_BUILD=1
80
+ ENV XLA_SANDBOX_BASE "/dev/shm"
80
81
81
82
ARG tpuvm
82
83
ARG tf_cuda_compute_capabilities
You can’t perform that action at this time.
0 commit comments