Skip to content

Commit

Permalink
Don't run the --nobuild command for Tensorflow, MacOS builds
Browse files Browse the repository at this point in the history
parallel unavailable on macos VM, TF has config issues that prevent this

PiperOrigin-RevId: 684622821
  • Loading branch information
ddunl authored and Google-ML-Automation committed Oct 10, 2024
1 parent b9fa72e commit 48288e7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
23 changes: 17 additions & 6 deletions build_tools/ci/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,23 @@ def commands(self) -> List[List[str]]:
# We really want `bazel fetch` here, but it uses `bazel query` and not
# `cquery`, which means that it fails due to config issues that aren't
# problems in practice.
cmds.append(
maybe_docker_exec
+ retry(
self.bazel_command(subcommand="build", extra_options=("--nobuild",))
)
)

# TODO(ddunleavy): Remove the condition here. Need to get parallel on the
# MacOS VM, and slightly change TF config (likely by specifying tag_filters
# manually).
if self.type_ not in (
BuildType.TENSORFLOW_CPU,
BuildType.TENSORFLOW_GPU,
BuildType.MACOS_CPU_X86,
):
cmds.append(
maybe_docker_exec
+ retry(
self.bazel_command(
subcommand="build", extra_options=("--nobuild",)
)
)
)
cmds.append(maybe_docker_exec + self.bazel_command())
cmds.append(
maybe_docker_exec + ["bazel", "analyze-profile", "profile.json.gz"]
Expand Down
3 changes: 0 additions & 3 deletions build_tools/ci/golden_commands.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ sudo wget --no-verbose -O /usr/local/bin/bazel https://github.com/bazelbuild/baz
chmod +x /usr/local/bin/bazel
bazel --version
mkdir -p /Volumes/BuildData/bazel_output
parallel --ungroup --retries 3 --delay 15 --nonall -- bazel build --build_tag_filters=-no_oss,-gpu,-no_mac,-mac_excluded,-requires-gpu-nvidia,-requires-gpu-amd --test_tag_filters=-no_oss,-gpu,-no_mac,-mac_excluded,-requires-gpu-nvidia,-requires-gpu-amd --config=nonccl --test_output=errors --verbose_failures --keep_going --nobuild_tests_only --profile=profile.json.gz --flaky_test_attempts=3 --jobs=150 --bes_upload_mode=fully_async --macos_minimum_os=10.15 --test_tmpdir=/Volumes/BuildData/bazel_output --nobuild -- //xla/... -//xla/hlo/experimental/... -//xla/python_api/... -//xla/python/... -//xla/service/gpu/...
bazel test --build_tag_filters=-no_oss,-gpu,-no_mac,-mac_excluded,-requires-gpu-nvidia,-requires-gpu-amd --test_tag_filters=-no_oss,-gpu,-no_mac,-mac_excluded,-requires-gpu-nvidia,-requires-gpu-amd --config=nonccl --test_output=errors --verbose_failures --keep_going --nobuild_tests_only --profile=profile.json.gz --flaky_test_attempts=3 --jobs=150 --bes_upload_mode=fully_async --macos_minimum_os=10.15 --test_tmpdir=/Volumes/BuildData/bazel_output -- //xla/... -//xla/hlo/experimental/... -//xla/python_api/... -//xla/python/... -//xla/service/gpu/...
bazel analyze-profile profile.json.gz
# END BuildType.MACOS_CPU_X86
Expand All @@ -61,7 +60,6 @@ $KOKORO_ARTIFACTS_DIR/github/xla/.kokoro/generate_index_html.sh index.html
git clone --depth=1 https://github.com/tensorflow/tensorflow ./github/tensorflow
parallel --ungroup --retries 3 --delay 15 --nonall -- docker pull gcr.io/tensorflow-sigs/build:latest-python3.11
docker run --detach --name=xla_ci --rm --interactive --tty --volume=./github:/github --workdir=/github/tensorflow gcr.io/tensorflow-sigs/build:latest-python3.11 bash
docker exec xla_ci parallel --ungroup --retries 3 --delay 15 --nonall -- bazel build --build_tag_filters= --test_tag_filters= --config=release_cpu_linux --config=rbe_linux_cpu --config=linux_cpu_pycpp_test_filters --verbose_failures --test_output=errors --override_repository=xla=/github/xla --profile=profile.json.gz --nobuild -- //tensorflow/compiler/... -//tensorflow/compiler/tf2tensorrt/... //tensorflow/python/... -//tensorflow/python/distribute/... -//tensorflow/python/compiler/tensorrt/...
docker exec xla_ci bazel test --build_tag_filters= --test_tag_filters= --config=release_cpu_linux --config=rbe_linux_cpu --config=linux_cpu_pycpp_test_filters --verbose_failures --test_output=errors --override_repository=xla=/github/xla --profile=profile.json.gz -- //tensorflow/compiler/... -//tensorflow/compiler/tf2tensorrt/... //tensorflow/python/... -//tensorflow/python/distribute/... -//tensorflow/python/compiler/tensorrt/...
docker exec xla_ci bazel analyze-profile profile.json.gz
docker stop xla_ci
Expand All @@ -71,7 +69,6 @@ $KOKORO_ARTIFACTS_DIR/github/xla/.kokoro/generate_index_html.sh index.html
git clone --depth=1 https://github.com/tensorflow/tensorflow ./github/tensorflow
parallel --ungroup --retries 3 --delay 15 --nonall -- docker pull gcr.io/tensorflow-sigs/build:latest-python3.11
docker run --detach --name=xla_ci --rm --interactive --tty --volume=./github:/github --workdir=/github/tensorflow gcr.io/tensorflow-sigs/build:latest-python3.11 bash
docker exec xla_ci parallel --ungroup --retries 3 --delay 15 --nonall -- bazel build --build_tag_filters=-no_oss,+gpu --test_tag_filters=-no_oss,+gpu --config=release_gpu_linux --config=rbe_linux_cuda --config=linux_cuda_pycpp_test_filters --verbose_failures --test_output=errors --override_repository=xla=/github/xla --profile=profile.json.gz --nobuild -- //tensorflow/compiler/... -//tensorflow/compiler/tf2tensorrt/... //tensorflow/python/... -//tensorflow/python/distribute/... -//tensorflow/python/compiler/tensorrt/...
docker exec xla_ci bazel test --build_tag_filters=-no_oss,+gpu --test_tag_filters=-no_oss,+gpu --config=release_gpu_linux --config=rbe_linux_cuda --config=linux_cuda_pycpp_test_filters --verbose_failures --test_output=errors --override_repository=xla=/github/xla --profile=profile.json.gz -- //tensorflow/compiler/... -//tensorflow/compiler/tf2tensorrt/... //tensorflow/python/... -//tensorflow/python/distribute/... -//tensorflow/python/compiler/tensorrt/...
docker exec xla_ci bazel analyze-profile profile.json.gz
docker stop xla_ci
Expand Down

0 comments on commit 48288e7

Please sign in to comment.