blob: a29897226e8bfbf3774640bef2f5f22f59259981 [file] [log] [blame]
Gunhan Gulsoye70d0952019-11-15 15:29:33 -08001# TensorFlow Bazel configuration file.
2# This file tries to group and simplify build options for TensorFlow
3#
4# ----CONFIG OPTIONS----
5# Android options:
6# android:
7# android_arm:
8# android_x86:
9# android_x86_64:
10#
11# iOS options:
12# ios:
13# ios_armv7:
14# ios_arm64:
YoungSeok Yoon29e6eaf2019-11-22 18:59:46 -080015# ios_i386:
Gunhan Gulsoye70d0952019-11-15 15:29:33 -080016# ios_x86_64:
17# ios_fat:
18#
19# Compiler options:
20# cuda_clang: Use clang when building CUDA code.
21# c++17: Build with C++17 options
22# C++1z: Build with C++17 options
23# avx_linux: Build with avx instruction set on linux.
24# avx2_linux: Build with avx2 instruction set on linux.
25# arch_native_linux: Build with instruction sets available to the host machine on linux
26# avx_win: Build with avx instruction set on windows
27# avx2_win: Build with avx2 instruction set on windows
28#
29# Other build options:
30# short_logs: Only log errors during build, skip warnings.
31# monolithic: Build all TF C++ code into a single shared object.
32# dynamic_kernels: Try to link all kernels dynamically (experimental).
33#
34#
35# TF version options;
36# v1: Build TF V1 (without contrib)
37# v2: Build TF v2
38#
39# Feature and Third party library support options:
40# xla: Build TF with XLA
41# using_cuda: CUDA is available to build system.
42# cuda: Build with full cuda support.
43# rocm: Build with AMD GPU support (rocm).
44# sycl: Build with SYCL support.
45# sycl_nodouble:
46# sycl_asan:
47# sycl_trisycl:
48# mkl: Enable full mkl support.
49# mkl_open_source_only: Enable MKL support only using open source MKL libraries.
50# tensorrt: Enable Tensorrt support.
51# ngraph: Enable ngraph support.
52# numa: Enable numa using hwloc.
53# noaws: Disable AWS S3 storage support
54# nogcp: Disable GCS support.
55# nohdfs: Disable hadoop hdfs support.
56# nonccl: Disable nccl support.
57#
58#
59# Remote build execution options (only configured to work with TF team projects for now.)
60# rbe: General RBE options shared by all flavors.
61# rbe_linux: General RBE options used on all linux builds.
62# rbe_win: General RBE options used on all windows builds.
63#
64# rbe_cpu_linux: RBE options to build with only CPU support.
65# rbe_linux_cuda_nvcc: RBE options to build with GPU support using nvcc.
66# rbe_gpu_linux: An alias for rbe_linux_cuda_nvcc
67#
68# rbe_linux_py2: Linux Python 2 RBE config.
69# rbe_linux_py3: Linux Python 3 RBE config
70#
71# rbe_win_py37: Windows Python 3.7 RBE config
Gunhan Gulsoy0b5f6be2020-01-30 10:46:31 -080072# rbe_win_py38: Windows Python 3.8 RBE config
Gunhan Gulsoye70d0952019-11-15 15:29:33 -080073#
74# tensorflow_testing_rbe_linux: RBE options to use RBE with tensorflow-testing project on linux
75# tensorflow_testing_rbe_win: RBE options to use RBE with tensorflow-testing project on windows
76#
77
78
79
Austin Anderson0f68a222018-01-10 15:16:01 -080080# Android configs. Bazel needs to have --cpu and --fat_apk_cpu both set to the
81# target CPU to build transient dependencies correctly. See
82# https://docs.bazel.build/versions/master/user-manual.html#flag--fat_apk_cpu
Michael Cased31531a2018-01-05 14:09:41 -080083build:android --crosstool_top=//external:android/crosstool
84build:android --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
85build:android_arm --config=android
86build:android_arm --cpu=armeabi-v7a
Austin Anderson0f68a222018-01-10 15:16:01 -080087build:android_arm --fat_apk_cpu=armeabi-v7a
Michael Cased31531a2018-01-05 14:09:41 -080088build:android_arm64 --config=android
89build:android_arm64 --cpu=arm64-v8a
Austin Anderson0f68a222018-01-10 15:16:01 -080090build:android_arm64 --fat_apk_cpu=arm64-v8a
Joe Bowser560cdce2019-04-23 10:22:12 -070091build:android_x86 --config=android
92build:android_x86 --cpu=x86
Joe Bowser2f0654c2019-05-13 13:28:47 -070093build:android_x86 --fat_apk_cpu=x86
Joe Bowser560cdce2019-04-23 10:22:12 -070094build:android_x86_64 --config=android
95build:android_x86_64 --cpu=x86_64
96build:android_x86_64 --fat_apk_cpu=x86_64
Michael Cased31531a2018-01-05 14:09:41 -080097
A. Unique TensorFlowerdc34ddc2019-03-01 14:37:15 -080098# Sets the default Apple platform to macOS.
99build --apple_platform_type=macos
100
A. Unique TensorFlower32aaaec2019-09-17 23:21:24 -0700101# iOS configs for each architecture and the fat binary builds.
102build:ios --apple_platform_type=ios
103build:ios --apple_bitcode=embedded --copt=-fembed-bitcode
YoungSeok Yoon05ed82f2019-12-02 20:43:51 -0800104build:ios --copt=-Wno-c++11-narrowing
A. Unique TensorFlower32aaaec2019-09-17 23:21:24 -0700105build:ios_armv7 --config=ios
106build:ios_armv7 --cpu=ios_armv7
A. Unique TensorFlower32aaaec2019-09-17 23:21:24 -0700107build:ios_arm64 --config=ios
108build:ios_arm64 --cpu=ios_arm64
YoungSeok Yoon29e6eaf2019-11-22 18:59:46 -0800109build:ios_i386 --config=ios
110build:ios_i386 --cpu=ios_i386
A. Unique TensorFlower32aaaec2019-09-17 23:21:24 -0700111build:ios_x86_64 --config=ios
112build:ios_x86_64 --cpu=ios_x86_64
113build:ios_fat --config=ios
YoungSeok Yoon29e6eaf2019-11-22 18:59:46 -0800114build:ios_fat --ios_multi_cpus=armv7,arm64,i386,x86_64
A. Unique TensorFlower32aaaec2019-09-17 23:21:24 -0700115
Michael Cased31531a2018-01-05 14:09:41 -0800116# Config to use a mostly-static build and disable modular op registration
117# support (this will revert to loading TensorFlow with RTLD_GLOBAL in Python).
118# By default, TensorFlow will build with a dependence on
119# //tensorflow:libtensorflow_framework.so.
120build:monolithic --define framework_shared_object=false
121
122# For projects which use TensorFlow as part of a Bazel build process, putting
123# nothing in a bazelrc will default to a monolithic build. The following line
124# opts in to modular op registration support by default.
125build --define framework_shared_object=true
126
Yifei Feng2021e7f2019-08-05 16:21:44 -0700127# Flags for open source build, always set to be true.
128build --define open_source_build=true
129test --define open_source_build=true
130
A. Unique TensorFlower46c3cb02019-10-17 08:39:52 -0700131# For workaround https://github.com/bazelbuild/bazel/issues/8772 with Bazel >= 0.29.1
132build --java_toolchain=//third_party/toolchains/java:tf_java_toolchain
133build --host_java_toolchain=//third_party/toolchains/java:tf_java_toolchain
134
Michael Cased31531a2018-01-05 14:09:41 -0800135# Please note that MKL on MacOS or windows is still not supported.
136# If you would like to use a local MKL instead of downloading, please set the
137# environment variable "TF_MKL_ROOT" every time before build.
A. Unique TensorFlowerc63d21b2018-09-25 22:57:54 -0700138build:mkl --define=build_with_mkl=true --define=enable_mkl=true
Penporn Koanantakool044b34b2019-01-07 11:13:45 -0800139build:mkl --define=tensorflow_mkldnn_contraction_kernel=0
Michael Cased31531a2018-01-05 14:09:41 -0800140build:mkl -c opt
141
Mahmoud Abuzaina64117da2018-07-05 13:56:22 -0700142# This config option is used to enable MKL-DNN open source library only,
143# without depending on MKL binary version.
Gunhan Gulsoy6cd61152018-10-17 13:02:06 -0700144build:mkl_open_source_only --define=build_with_mkl_dnn_only=true
Bhavani Subramanian48671af2019-06-26 13:11:12 -0700145build:mkl_open_source_only --define=build_with_mkl_dnn_v1_only=true
A. Unique TensorFlowerc63d21b2018-09-25 22:57:54 -0700146build:mkl_open_source_only --define=build_with_mkl=true --define=enable_mkl=true
Penporn Koanantakool044b34b2019-01-07 11:13:45 -0800147build:mkl_open_source_only --define=tensorflow_mkldnn_contraction_kernel=0
Mahmoud Abuzaina64117da2018-07-05 13:56:22 -0700148
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700149# This config refers to building with CUDA available. It does not necessarily
150# mean that we build CUDA op kernels.
151build:using_cuda --define=using_cuda=true
152build:using_cuda --action_env TF_NEED_CUDA=1
153build:using_cuda --crosstool_top=@local_config_cuda//crosstool:toolchain
154
155# This config refers to building CUDA op kernels with nvcc.
156build:cuda --config=using_cuda
157build:cuda --define=using_cuda_nvcc=true
158
159# This config refers to building CUDA op kernels with clang.
160build:cuda_clang --config=using_cuda
161build:cuda_clang --define=using_cuda_clang=true
162build:cuda_clang --define=using_clang=true
Christian Sigg866724d2019-09-19 02:17:43 -0700163build:cuda_clang --action_env TF_CUDA_CLANG=1
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700164
Bas Aarts56ec7862019-11-08 10:36:51 -0800165# dbg config, as a shorthand for '--config=opt -c dbg'
166build:dbg --config=opt -c dbg
167# for now, disable arm_neon. see: https://github.com/tensorflow/tensorflow/issues/33360
168build:dbg --cxxopt -DTF_LITE_DISABLE_X86_NEON
169
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700170build:tensorrt --action_env TF_NEED_TENSORRT=1
A. Unique TensorFloweraaa56002017-05-02 08:25:23 -0800171
Wen-Heng (Jack) Chung69d3b8f2018-06-22 23:09:43 -0500172build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain
173build:rocm --define=using_rocm=true --define=using_rocm_hipcc=true
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700174build:rocm --action_env TF_NEED_ROCM=1
A. Unique TensorFloweraaa56002017-05-02 08:25:23 -0800175
A. Unique TensorFloweraaa56002017-05-02 08:25:23 -0800176build:sycl --crosstool_top=@local_config_sycl//crosstool:toolchain
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700177build:sycl --define=using_sycl=true
178build:sycl --action_env TF_NEED_OPENCL_SYCL=1
A. Unique TensorFloweraaa56002017-05-02 08:25:23 -0800179
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700180build:sycl_nodouble --config=sycl
181build:sycl_nodouble --cxxopt -DTENSORFLOW_SYCL_NO_DOUBLE
Jonathan Hseu9cc871e2017-07-19 15:04:52 -0700182
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700183build:sycl_nodouble --config=sycl
184build:sycl_asan --copt -fno-omit-frame-pointer --copt -fsanitize-coverage=3 --copt -DGPR_NO_DIRECT_SYSCALLS --linkopt -fPIC --linkopt -fsanitize=address
Yifei Fengb1d8c592017-11-22 13:42:21 -0800185
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700186build:sycl_nodouble --config=sycl
187build:sycl_trisycl --define=using_trisycl=true
A. Unique TensorFloweraaa56002017-05-02 08:25:23 -0800188
Gunhan Gulsoy3da0dff2018-09-26 11:55:50 -0700189# Options extracted from configure script
Gunhan Gulsoy3da0dff2018-09-26 11:55:50 -0700190build:ngraph --define=with_ngraph_support=true
A. Unique TensorFlowera6bf9c82019-02-26 10:08:35 -0800191build:numa --define=with_numa_support=true
Gunhan Gulsoy3da0dff2018-09-26 11:55:50 -0700192
Gunhan Gulsoy34370982018-10-12 15:26:01 -0700193# Options to disable default on features
194build:noaws --define=no_aws_support=true
195build:nogcp --define=no_gcp_support=true
196build:nohdfs --define=no_hdfs_support=true
Gunhan Gulsoyeea81682018-11-26 16:51:23 -0800197build:nonccl --define=no_nccl_support=true
Gunhan Gulsoy34370982018-10-12 15:26:01 -0700198
A. Unique TensorFloweraaa56002017-05-02 08:25:23 -0800199build --define=use_fast_cpp_protos=true
200build --define=allow_oversize_protos=true
201
Dong Linee5bf622019-07-17 14:06:21 -0700202build --spawn_strategy=standalone
A. Unique TensorFloweraaa56002017-05-02 08:25:23 -0800203build -c opt
Gunhan Gulsoy5a5e42e2018-08-03 14:44:58 -0700204
A. Unique TensorFlowere617d322019-05-27 00:29:46 -0700205# Make Bazel print out all options from rc files.
206build --announce_rc
207
Gunhan Gulsoy3da0dff2018-09-26 11:55:50 -0700208# Other build flags.
209build --define=grpc_no_ares=true
210
A. Unique TensorFlowerc9d1b6d2019-11-27 14:17:37 -0800211# See https://github.com/bazelbuild/bazel/issues/7362 for information on what
212# --incompatible_remove_legacy_whole_archive flag does.
213# This flag is set to true in Bazel 1.0 and newer versions. We tried to migrate
214# Tensorflow to the default, however test coverage wasn't enough to catch the
215# errors.
216# There is ongoing work on Bazel team's side to provide support for transitive
217# shared libraries. As part of migrating to transitive shared libraries, we
218# hope to provide a better mechanism for control over symbol exporting, and
219# then tackle this issue again.
220#
221# TODO: Remove this line once TF doesn't depend on Bazel wrapping all library
222# archives in -whole_archive -no_whole_archive.
223build --noincompatible_remove_legacy_whole_archive
A. Unique TensorFlowerf58c9f82019-10-29 12:27:05 -0700224
Gunhan Gulsoy5a5e42e2018-08-03 14:44:58 -0700225# Modular TF build options
226build:dynamic_kernels --define=dynamic_loaded_kernels=true
Gunhan Gulsoyce126592018-10-18 14:07:57 -0700227build:dynamic_kernels --copt=-DAUTOLOAD_DYNAMIC_KERNELS
Jason Zaman05b43db2018-08-15 15:20:56 +0800228
Gunhan Gulsoy3bc51322019-02-01 13:27:15 -0800229# Build TF with C++ 17 features.
230build:c++17 --cxxopt=-std=c++1z
231build:c++17 --cxxopt=-stdlib=libc++
A. Unique TensorFlowerfef51672019-05-23 04:19:20 -0700232build:c++1z --config=c++17
Gunhan Gulsoy3bc51322019-02-01 13:27:15 -0800233
Gunhan Gulsoy1868de82019-12-02 13:31:04 -0800234# Enable using platform specific build settings
235build --enable_platform_specific_config
Jason Zamanb41761c2018-10-14 11:28:53 +0800236
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800237# Suppress C++ compiler warnings, otherwise build logs become 10s of MBs.
Gunhan Gulsoy1868de82019-12-02 13:31:04 -0800238build:linux --copt=-w
239build:macos --copt=-w
240build:windows --copt=/w
241
Artem Belevich42f8dd12019-12-20 14:37:39 -0800242# Tensorflow uses M_* math constants that only get defined by MSVC headers if
243# _USE_MATH_DEFINES is defined.
244build:windows --copt=/D_USE_MATH_DEFINES
245
Gunhan Gulsoy1868de82019-12-02 13:31:04 -0800246# Default paths for TF_SYSTEM_LIBS
247build:linux --define=PREFIX=/usr
248build:linux --define=LIBDIR=$(PREFIX)/lib
249build:linux --define=INCLUDEDIR=$(PREFIX)/include
250build:macos --define=PREFIX=/usr
251build:macos --define=LIBDIR=$(PREFIX)/lib
252build:macos --define=INCLUDEDIR=$(PREFIX)/include
253# TF_SYSTEM_LIBS do not work on windows.
254
255# By default, build TF in C++ 14 mode.
256build:linux --cxxopt=-std=c++14
257build:linux --host_cxxopt=-std=c++14
258build:macos --cxxopt=-std=c++14
259build:macos --host_cxxopt=-std=c++14
260build:windows --cxxopt=/std:c++14
261build:windows --host_cxxopt=/std:c++14
262
263# On windows, we still link everything into a single DLL.
264build:windows --config=monolithic
265
Gunhan Gulsoy904c2762019-12-16 10:36:27 -0800266# On linux, we dynamically link small amount of kernels
Gunhan Gulsoy57c057b2019-12-12 02:17:20 -0800267build:linux --config=dynamic_kernels
Gunhan Gulsoy57c057b2019-12-12 02:17:20 -0800268
Gunhan Gulsoy1868de82019-12-02 13:31:04 -0800269# Make sure to include as little of windows.h as possible
270build:windows --copt=-DWIN32_LEAN_AND_MEAN
271build:windows --host_copt=-DWIN32_LEAN_AND_MEAN
272build:windows --copt=-DNOGDI
273build:windows --host_copt=-DNOGDI
274
275# Misc build options we need for windows.
276build:windows --linkopt=/DEBUG
277build:windows --host_linkopt=/DEBUG
278build:windows --linkopt=/OPT:REF
279build:windows --host_linkopt=/OPT:REF
280build:windows --linkopt=/OPT:ICF
281build:windows --host_linkopt=/OPT:ICF
282build:windows --experimental_strict_action_env=true
Gunhan Gulsoy1868de82019-12-02 13:31:04 -0800283
284# Verbose failure logs when something goes wrong
285build:windows --verbose_failures
286
287# On windows, we never cross compile
288build:windows --distinct_host_configuration=false
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800289
Gunhan Gulsoy08dfb5c2019-06-03 10:37:43 -0700290# Suppress all warning messages.
291build:short_logs --output_filter=DONT_MATCH_ANYTHING
292
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800293# Instruction set optimizations
294# TODO(gunan): Create a feature in toolchains for avx/avx2 to
295# avoid having to define linux/win separately.
296build:avx_linux --copt=-mavx
297build:avx2_linux --copt=-mavx2
298build:native_arch_linux --copt=-march=native
299build:avx_win --copt=/arch=AVX
300build:avx2_win --copt=/arch=AVX2
Gunhan Gulsoy71f9f0c2019-06-12 21:16:40 -0700301
Anna R50515e82019-09-26 09:50:26 -0700302# Options to build TensorFlow 1.x or 2.x.
303build:v1 --define=tf_api_version=1
304build:v2 --define=tf_api_version=2
Brian Atkinson0ebcbd92019-10-24 12:59:32 -0700305build:v1 --action_env=TF2_BEHAVIOR=0
306build:v2 --action_env=TF2_BEHAVIOR=1
A. Unique TensorFlower2a8e8702019-10-02 18:45:34 -0700307build --config=v2
308test --config=v2
Anna R50515e82019-09-26 09:50:26 -0700309
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800310# Enable XLA
311build:xla --action_env=TF_ENABLE_XLA=1
312build:xla --define=with_xla_support=true
313
314# BEGIN TF REMOTE BUILD EXECUTION OPTIONS
315# Options when using remote execution
316# WARNING: THESE OPTIONS WONT WORK IF YOU DO NOT HAVE PROPER AUTHENTICATION AND PERMISSIONS
317build:rbe --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
318build:rbe --auth_enabled=true
319build:rbe --auth_scope=https://www.googleapis.com/auth/cloud-source-tools
320build:rbe --bes_backend=buildeventservice.googleapis.com
321build:rbe --bes_best_effort=false
322build:rbe --bes_results_url="https://source.cloud.google.com/results/invocations"
323build:rbe --bes_timeout=600s
324build:rbe --define=EXECUTOR=remote
325build:rbe --flaky_test_attempts=3
326build:rbe --jobs=200
327build:rbe --remote_executor=grpcs://remotebuildexecution.googleapis.com
328build:rbe --remote_timeout=3600
Gunhan Gulsoyff426352019-11-18 15:28:56 -0800329build:rbe --spawn_strategy=remote,worker,standalone,local
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800330test:rbe --test_env=USER=anon
331
332build:rbe --distinct_host_configuration=false
333
334build:rbe_linux --config=rbe
335build:rbe_linux --action_env=PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin"
336build:rbe_linux --host_javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.1:jdk8
337build:rbe_linux --javabase=@bazel_toolchains//configs/ubuntu16_04_clang/1.1:jdk8
338build:rbe_linux --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
339build:rbe_linux --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
340
341# Non-rbe settings we should include because we do not run configure
342build:rbe_linux --config=xla
343build:rbe_linux --config=avx_linux
344build:rbe_linux --config=short_logs
345# TODO(gunan): Check why we need this specified in rbe, but not in other builds.
346build:rbe_linux --linkopt=-lrt
Pete Wardenadf6e222020-01-23 15:16:46 -0800347build:rbe_linux --linkopt=-lm
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800348
349build:rbe_cpu_linux --config=rbe_linux
350build:rbe_cpu_linux --crosstool_top="//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010:toolchain"
351build:rbe_cpu_linux --extra_toolchains="//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010:cc-toolchain-k8"
352build:rbe_cpu_linux --extra_execution_platforms"=@org_tensorflow//third_party/toolchains:rbe_ubuntu16.04-manylinux2010"
353build:rbe_cpu_linux --host_platform="@org_tensorflow//third_party/toolchains:rbe_ubuntu16.04-manylinux2010"
354build:rbe_cpu_linux --platforms="@org_tensorflow//third_party/toolchains:rbe_ubuntu16.04-manylinux2010"
355
356build:rbe_linux_cuda_nvcc --config=rbe_linux
357build:rbe_linux_cuda_nvcc --crosstool_top="//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.1:toolchain"
358build:rbe_linux_cuda_nvcc --extra_toolchains="//third_party/toolchains/preconfig/ubuntu16.04/gcc7_manylinux2010-nvcc-cuda10.1:toolchain-linux-x86_64"
359build:rbe_linux_cuda_nvcc --extra_execution_platforms="@org_tensorflow//third_party/toolchains:rbe_cuda10.1-cudnn7-ubuntu16.04-manylinux2010,@org_tensorflow//third_party/toolchains:rbe_cuda10.1-cudnn7-ubuntu16.04-manylinux2010-gpu"
360build:rbe_linux_cuda_nvcc --host_platform="@org_tensorflow//third_party/toolchains:rbe_cuda10.1-cudnn7-ubuntu16.04-manylinux2010"
361build:rbe_linux_cuda_nvcc --platforms="@org_tensorflow//third_party/toolchains:rbe_cuda10.1-cudnn7-ubuntu16.04-manylinux2010"
362build:rbe_linux_cuda_nvcc --repo_env=TF_CUDA_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/cuda10.1-cudnn7"
Brian Zhao95fc3bd2019-11-18 10:37:52 -0800363build:rbe_linux_cuda_nvcc --repo_env=TF_TENSORRT_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/tensorrt6.0"
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800364build:rbe_linux_cuda_nvcc --repo_env=TF_NEED_TENSORRT=1
365build:rbe_linux_cuda_nvcc --repo_env=TF_CUDA_VERSION=10
366build:rbe_linux_cuda_nvcc --repo_env=TF_CUDNN_VERSION=7
367build:rbe_linux_cuda_nvcc --repo_env=REMOTE_GPU_TESTING=1
368build:rbe_linux_cuda_nvcc --repo_env=TF_NEED_CUDA=1
369build:rbe_linux_cuda_nvcc --define=using_cuda_nvcc=true
370test:rbe_linux_cuda_nvcc --test_env=LD_LIBRARY_PATH="/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64"
371
372common:rbe_gpu_linux --config=rbe_linux_cuda_nvcc
373
374build:rbe_linux_py2 --config=rbe_linux
375build:rbe_linux_py2 --repo_env=PYTHON_BIN_PATH="/usr/bin/python2"
376build:rbe_linux_py2 --python_path="/usr/bin/python2"
377build:rbe_linux_py2 --repo_env=TF_PYTHON_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/py"
378
379build:rbe_linux_py3 --config=rbe_linux
380build:rbe_linux_py3 --repo_env=PYTHON_BIN_PATH="/usr/bin/python3"
381build:rbe_linux_py3 --python_path="/usr/bin/python3"
382build:rbe_linux_py3 --repo_env=TF_PYTHON_CONFIG_REPO="@org_tensorflow//third_party/toolchains/preconfig/ubuntu16.04/py3"
383
384build:rbe_win --config=rbe
Gunhan Gulsoyb6180512019-12-31 05:43:55 -0800385build:rbe_win --crosstool_top="@org_tensorflow//third_party/toolchains/preconfig/win_1803/bazel_121:toolchain"
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800386build:rbe_win --extra_execution_platforms="@org_tensorflow//third_party/toolchains/preconfig/win_1803:rbe_windows_1803"
Gunhan Gulsoyb6180512019-12-31 05:43:55 -0800387build:rbe_win --extra_toolchains="@org_tensorflow//third_party/toolchains/preconfig/win_1803/bazel_121:cc-toolchain-x64_windows"
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800388build:rbe_win --host_javabase="@org_tensorflow//third_party/toolchains/preconfig/win_1803:windows_jdk8"
389build:rbe_win --host_platform="@org_tensorflow//third_party/toolchains/preconfig/win_1803:rbe_windows_1803"
390build:rbe_win --javabase="@org_tensorflow//third_party/toolchains/preconfig/win_1803:windows_jdk8"
391build:rbe_win --platforms="@org_tensorflow//third_party/toolchains/preconfig/win_1803:rbe_windows_1803"
392build:rbe_win --shell_executable=C:\\tools\\msys64\\usr\\bin\\bash.exe
393
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800394# TODO(gunan): Remove once we use MSVC 2019 with latest patches.
395build:rbe_win --define=override_eigen_strong_inline=true
Gunhan Gulsoy0b5f6be2020-01-30 10:46:31 -0800396build:rbe_win --jobs=500
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800397
398build:rbe_win_py37 --config=rbe
399build:rbe_win_py37 --repo_env=PYTHON_BIN_PATH=C:\\Python37\\python.exe
400build:rbe_win_py37 --repo_env=PYTHON_LIB_PATH=C:\\Python37\\lib\\site-packages
401build:rbe_win_py37 --repo_env=TF_PYTHON_CONFIG_REPO=@org_tensorflow//third_party/toolchains/preconfig/win_1803/py37
402build:rbe_win_py37 --python_path=C:\\Python37\\python.exe
403
Gunhan Gulsoy0b5f6be2020-01-30 10:46:31 -0800404build:rbe_win_py38 --config=rbe
405build:rbe_win_py38 --repo_env=PYTHON_BIN_PATH=C:\\Python38\\python.exe
406build:rbe_win_py38 --repo_env=PYTHON_LIB_PATH=C:\\Python38\\lib\\site-packages
407build:rbe_win_py38 --repo_env=TF_PYTHON_CONFIG_REPO=@org_tensorflow//third_party/toolchains/preconfig/win_1803/py38
408build:rbe_win_py38 --python_path=C:\\Python38\\python.exe
409
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800410# These you may need to change for your own GCP project.
411build:tensorflow_testing_rbe --project_id=tensorflow-testing
Gunhan Gulsoy06f9ec32019-11-18 17:21:21 -0800412common:tensorflow_testing_rbe_linux --remote_instance_name=projects/tensorflow-testing/instances/default_instance
Gunhan Gulsoye70d0952019-11-15 15:29:33 -0800413build:tensorflow_testing_rbe_linux --config=tensorflow_testing_rbe
414build:tensorflow_testing_rbe_linux --config=rbe
415build:tensorflow_testing_rbe_linux --config=rbe_linux
416
417common:tensorflow_testing_rbe_win --remote_instance_name=projects/tensorflow-testing/instances/windows
418build:tensorflow_testing_rbe_win --config=tensorflow_testing_rbe
419build:tensorflow_testing_rbe_win --config=rbe_win
420# END TF REMOTE BUILD EXECUTION OPTIONS
421
Jason Zamanb41761c2018-10-14 11:28:53 +0800422# Default options should come above this line
423
424# Options from ./configure
425try-import %workspace%/.tf_configure.bazelrc
426
427# Put user-specific options in .bazelrc.user
428try-import %workspace%/.bazelrc.user