Skip to content

Commit 7c28a01

Browse files
nitins17copybara-github
authored andcommitted
Remove duplicated XLA .bazelrc configs
These were created to be able to set a different path to the toolchain configs when building XLA. Instead of creating duplicated configs, we will use copybara to transform paths in the .bazelrc between TF and XLA. PiperOrigin-RevId: 707109121
1 parent 77ee03c commit 7c28a01

File tree

1 file changed

+1
-46
lines changed

1 file changed

+1
-46
lines changed

.bazelrc

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -462,19 +462,7 @@ build:win_clang --linkopt=/FORCE:MULTIPLE
462462
build:win_clang --host_linkopt=/FORCE:MULTIPLE
463463
test:win_clang --linkopt=/FORCE:MULTIPLE
464464
test:win_clang --host_linkopt=/FORCE:MULTIPLE
465-
466-
# Same config as above but for XLA, which has different toolchain paths
467-
build:win_clang_xla --copt=/clang:-Weverything
468-
build:win_clang_xla --host_copt=/clang:-Weverything
469-
build:win_clang_xla --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows-clang-cl
470-
build:win_clang_xla --extra_execution_platforms=//tools/toolchains/win:x64_windows-clang-cl
471-
build:win_clang_xla --host_platform=//tools/toolchains/win:x64_windows-clang-cl
472-
build:win_clang_xla --compiler=clang-cl
473-
build:win_clang_xla --linkopt=/FORCE:MULTIPLE
474-
build:win_clang_xla --host_linkopt=/FORCE:MULTIPLE
475-
test:win_clang_xla --action_env=PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
476-
test:win_clang_xla --linkopt=/FORCE:MULTIPLE
477-
test:win_clang_xla --host_linkopt=/FORCE:MULTIPLE
465+
test:win_clang --action_env=PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.PY;.PYW
478466

479467
# Options to build TensorFlow 1.x or 2.x.
480468
# TODO(kanglan): Change v2's define to default behavior
@@ -843,38 +831,15 @@ build:cross_compile_base --host_cpu=k8
843831
build:cross_compile_base --host_crosstool_top=//tensorflow/tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
844832
build:cross_compile_base --extra_execution_platforms=//tensorflow/tools/toolchains/cross_compile/config:linux_x86_64
845833

846-
# XLA related settings for cross-compiled build. Certain paths are
847-
# different in the XLA repo.
848-
build:cross_compile_base_xla --host_cpu=k8
849-
build:cross_compile_base_xla --host_crosstool_top=//tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
850-
build:cross_compile_base_xla --extra_execution_platforms=//tools/toolchains/cross_compile/config:linux_x86_64
851-
852834
build:rbe_cross_compile_base --config=rbe_base
853835
build:rbe_cross_compile_base --remote_instance_name=projects/tensorflow-testing/instances/default_instance
854836

855-
# XLA depends on some local Python headers that are configured as Genrule. They
856-
# are present on the local host machine but not on the remote execution machine,
857-
# leading to build failures. To resolve the issue, the following line is added
858-
# to make sure all Genrule targets are excuted locally.
859-
build:rbe_cross_compile_base_xla --config=rbe_cross_compile_base
860-
build:rbe_cross_compile_base_xla --strategy=Genrule=standalone
861-
862-
# Due to the above strategy, all Genrule commands are executed locally, but the
863-
# following actions invoke tools (E.g `flatc`, `llvm-tblgen`, etc.) that are
864-
# only executabe on the RBE (x86) machine, so the strategy_regexp options are
865-
# added to override and run the actions using remote strategy.
866-
build:rbe_cross_compile_base_xla --strategy_regexp='Generating code from table.*=remote'
867-
build:rbe_cross_compile_base_xla --strategy_regexp='Generating flatbuffer files.*=remote'
868-
build:rbe_cross_compile_base_xla --strategy_regexp='Executing genrule @llvm-project.*=remote'
869-
870837
# Test-related settings below this point
871838
# We cannot run cross-compiled tests on the remote Linux x86 VMs so we need to
872839
# force all tests to run locally on the Aarch64 host.
873840
test:rbe_cross_compile_base --strategy=TestRunner=local --build_tests_only
874841
test:rbe_cross_compile_base --verbose_failures=true --local_test_jobs=HOST_CPUS --test_output=errors
875842

876-
test:rbe_cross_compile_base_xla --config=rbe_cross_compile_base
877-
878843
# START LINUX AARCH64 CROSS-COMPILE CONFIGS
879844
build:cross_compile_linux_arm64 --config=cross_compile_base
880845

@@ -883,21 +848,11 @@ build:cross_compile_linux_arm64 --platforms=//tensorflow/tools/toolchains/cross_
883848
build:cross_compile_linux_arm64 --cpu=aarch64
884849
build:cross_compile_linux_arm64 --crosstool_top=//tensorflow/tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
885850

886-
# XLA uses different paths for platforms and crosstool_top.
887-
build:cross_compile_linux_arm64_xla --config=cross_compile_base_xla
888-
build:cross_compile_linux_arm64_xla --platforms=//tools/toolchains/cross_compile/config:linux_aarch64
889-
build:cross_compile_linux_arm64_xla --crosstool_top=//tools/toolchains/cross_compile/cc:cross_compile_toolchain_suite
890-
891851
# RBE cross-compile configs for Linux Aarch64
892852
build:rbe_cross_compile_linux_arm64 --config=cross_compile_linux_arm64
893853
build:rbe_cross_compile_linux_arm64 --config=rbe_cross_compile_base
894854
test:rbe_cross_compile_linux_arm64 --config=rbe_cross_compile_base
895855

896-
# RBE cross-compile configs for XLA Linux Aarch64
897-
build:rbe_cross_compile_linux_arm64_xla --config=cross_compile_linux_arm64_xla
898-
build:rbe_cross_compile_linux_arm64_xla --config=rbe_cross_compile_base_xla
899-
test:rbe_cross_compile_linux_arm64_xla --config=rbe_cross_compile_base_xla
900-
901856
# END LINUX AARCH64 CROSS-COMPILE CONFIGS
902857

903858
# START MACOS CROSS-COMPILE CONFIGS

0 commit comments

Comments
 (0)