Partial rollback of 296819597
Remove the prompt for XLA in configure. But still allow users to build without it for platforms like raspberry pi.
PiperOrigin-RevId: 297713015
Change-Id: I7a12b073389c1cf3d265e00952f28e98470c80ff
diff --git a/.bazelrc b/.bazelrc
index 3e427c0..288f1d2 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -37,6 +37,7 @@
# v2: Build TF v2
#
# Feature and Third party library support options:
+# xla: Build TF with XLA
# using_cuda: CUDA is available to build system.
# cuda: Build with full cuda support.
# rocm: Build with AMD GPU support (rocm).
@@ -226,14 +227,6 @@
# https://github.com/tensorflow/community/pull/179
build --noincompatible_prohibit_aapt1
-# Enable XLA
-build --action_env=TF_ENABLE_XLA=1
-build --define=with_xla_support=true
-
-# Keep config XLA until all build scripts are cleaned up.
-build:xla --action_env=TF_ENABLE_XLA=1
-build:xla --define=with_xla_support=true
-
# Modular TF build options
build:dynamic_kernels --define=dynamic_loaded_kernels=true
build:dynamic_kernels --copt=-DAUTOLOAD_DYNAMIC_KERNELS
@@ -245,6 +238,7 @@
# Enable using platform specific build settings
build --enable_platform_specific_config
+build --config=xla
# Suppress C++ compiler warnings, otherwise build logs become 10s of MBs.
build:linux --copt=-w
@@ -319,6 +313,10 @@
build --config=v2
test --config=v2
+# Enable XLA
+build:xla --action_env=TF_ENABLE_XLA=1
+build:xla --define=with_xla_support=true
+
# BEGIN TF REMOTE BUILD EXECUTION OPTIONS
# Options when using remote execution
# WARNING: THESE OPTIONS WONT WORK IF YOU DO NOT HAVE PROPER AUTHENTICATION AND PERMISSIONS
@@ -351,6 +349,7 @@
build:rbe_linux --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
# Non-rbe settings we should include because we do not run configure
+build:rbe_linux --config=xla
build:rbe_linux --config=avx_linux
build:rbe_linux --config=short_logs
# TODO(gunan): Check why we need this specified in rbe, but not in other builds.
diff --git a/configure.py b/configure.py
index 7f1a728..b93612a 100644
--- a/configure.py
+++ b/configure.py
@@ -1390,6 +1390,9 @@
else:
environ_cp['TF_CONFIGURE_IOS'] = '0'
+ if environ_cp.get('TF_ENABLE_XLA', 1):
+ write_to_bazelrc('build --config=xla')
+
set_action_env_var(
environ_cp,
'TF_NEED_OPENCL_SYCL',