forked from tensorflow/serving
-
Notifications
You must be signed in to change notification settings - Fork 10
/
.bazelrc
58 lines (43 loc) · 2.04 KB
/
.bazelrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Optimizations used for TF Serving release builds.
build:release --copt=-mavx
build:release --copt=-msse4.2
# Options used to build with CUDA.
build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain
build:cuda --define=using_cuda=true --define=using_cuda_nvcc=true
# Please note that MKL on MacOS or windows is still not supported.
# If you would like to use a local MKL instead of downloading, please set the
# environment variable "TF_MKL_ROOT" every time before build.
build:mkl --define=build_with_mkl=true --define=enable_mkl=true
build:mkl --define=tensorflow_mkldnn_contraction_kernel=0
# This config option is used to enable MKL-DNN open source library only,
# without depending on MKL binary version.
build:mkl_open_source_only --define=build_with_mkl_dnn_only=true
build:mkl_open_source_only --define=build_with_mkl=true --define=enable_mkl=true
build:mkl_open_source_only --define=tensorflow_mkldnn_contraction_kernel=0
# Processor native optimizations (depends on build host capabilities).
build:nativeopt --copt=-march=native
build:nativeopt --host_copt=-march=native
build:nativeopt --copt=-O3
# Reference https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html
build:x86-64 --copt=-march=x86-64
build:x86-64 --host_copt=-march=x86-64
build:x86-64 --copt=-O3
build --action_env PYTHON_BIN_PATH="/usr/bin/python3"
build --define PYTHON_BIN_PATH=/usr/bin/python3
build --spawn_strategy=standalone
build --genrule_strategy=standalone
build --define=grpc_no_ares=true
# Sets the default Apple platform to macOS.
build --apple_platform_type=macos
build -c opt
# LLVM, MLIR and TF require C++14.
build --cxxopt=-std=c++14
build --host_cxxopt=-std=c++14
# Adding "--cxxopt=-D_GLIBCXX_USE_CXX11_ABI=0" creates parity with TF
# compilation options. It also addresses memory use due to
# copy-on-write semantics of std::strings of the older ABI.
build --cxxopt=-D_GLIBCXX_USE_CXX11_ABI=1
build --workspace_status_command=/proc/self/cwd/tools/gen_status_stamp.sh
build --experimental_repo_remote_exec
build --copt=-Wno-maybe-uninitialized
build --copt=-fexceptions