Skip to content

Commit d58ce1b

Browse files
quoctruongcopybara-github
authored andcommitted
Add new ml-build-rbe container to the configurations of RBE used with remote config.
Update .bazelrc file to use the new RBE config. PiperOrigin-RevId: 706005323
1 parent 32dea85 commit d58ce1b

File tree

3 files changed

+23
-4
lines changed

3 files changed

+23
-4
lines changed

.bazelrc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,9 @@ build:rbe_linux_cpu --crosstool_top="@local_config_cuda//crosstool:toolchain"
533533
build:rbe_linux_cpu --extra_toolchains="@local_config_cuda//crosstool:toolchain-linux-x86_64"
534534
build:rbe_linux_cpu --repo_env=CC="/usr/lib/llvm-18/bin/clang"
535535
build:rbe_linux_cpu --repo_env=TF_SYSROOT="/dt9"
536-
build:rbe_linux_cpu --extra_execution_platforms="@sigbuild-r2.17-clang_config_platform//:platform"
537-
build:rbe_linux_cpu --host_platform="@sigbuild-r2.17-clang_config_platform//:platform"
538-
build:rbe_linux_cpu --platforms="@sigbuild-r2.17-clang_config_platform//:platform"
536+
build:rbe_linux_cpu --extra_execution_platforms="@ml_build_config_platform//:platform"
537+
build:rbe_linux_cpu --host_platform="@ml_build_config_platform//:platform"
538+
build:rbe_linux_cpu --platforms="@ml_build_config_platform//:platform"
539539
# This is needed for all Clang17 builds but must not be present in GCC builds.
540540
build:rbe_linux_cpu --copt=-Wno-error=unused-command-line-argument
541541
# This was added in clang-16 by https://reviews.llvm.org/D133574.

tools/toolchains/remote_config/configs.bzl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Configurations of RBE builds used with remote config."""
22

3-
load("//tools/toolchains/remote_config:rbe_config.bzl", "sigbuild_tf_configs", "tensorflow_local_config", "tensorflow_rbe_config", "tensorflow_rbe_win_config")
3+
load("//tools/toolchains/remote_config:rbe_config.bzl", "ml_build_rbe_config", "sigbuild_tf_configs", "tensorflow_local_config", "tensorflow_rbe_config", "tensorflow_rbe_win_config")
44

55
def initialize_rbe_configs():
66
tensorflow_local_config(
@@ -47,6 +47,11 @@ def initialize_rbe_configs():
4747
python_bin_path = "C:/Python37/python.exe",
4848
)
4949

50+
# The `ml-build-rbe` image is identical to the `ml-build` image except for the base image.
51+
# The `ml-build`'s base image is a standard `ubuntu22.04` image.
52+
# The `ml-build-rbe`'s base image is `nvidia/cuda:12.3.2-base-ubuntu22.04` which has nvidia driver installed.
53+
ml_build_rbe_config("docker://us-central1-docker.pkg.dev/tensorflow-sigs/tensorflow/ml-build-rbe@sha256:aaeb29799463729092c05f5ac8393113b3bb5d1ecf085f9f1f2016e3a1ece11c")
54+
5055
# TF-Version-Specific SIG Build RBE Configs. The crosstool generated from these
5156
# configs are python-version-independent because they only care about the
5257
# tooling paths; the container mapping is useful only so that TF RBE users

tools/toolchains/remote_config/rbe_config.bzl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,24 @@ def _tensorflow_local_config(name):
9292
platform_constraint = "@%s_config_platform//:platform_constraint" % name,
9393
)
9494

95+
def _ml_build_rbe_config(container_image):
96+
exec_properties = {
97+
"container-image": container_image,
98+
"Pool": "default",
99+
}
100+
101+
remote_platform_configure(
102+
name = "ml_build_config_platform",
103+
platform = "linux",
104+
platform_exec_properties = exec_properties,
105+
)
106+
95107
tensorflow_rbe_config = _tensorflow_rbe_config
96108
tensorflow_rbe_win_config = _tensorflow_rbe_win_config
97109
tensorflow_local_config = _tensorflow_local_config
110+
ml_build_rbe_config = _ml_build_rbe_config
98111

112+
# TODO(b/369382309): Remove this once ml_build_rbe_config is used everywhere.
99113
# Streamlined platform configuration for the SIG Build containers.
100114
# See //tensorflow/tools/tf_sig_build_dockerfiles
101115
# These containers do not support ROCm and all have CUDA.

0 commit comments

Comments
 (0)