forked from openvinotoolkit/model_server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bazelrc
101 lines (81 loc) · 3.37 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#
# Copyright (c) 2020 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# 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
# For Tensorflow building only
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
build --define=MEDIAPIPE_DISABLE_GPU=1
coverage --define=MEDIAPIPE_DISABLE_GPU=1
test --define=MEDIAPIPE_DISABLE_GPU=1
build --define=MEDIAPIPE_DISABLE=0
coverage --define=MEDIAPIPE_DISABLE=0
test --define=MEDIAPIPE_DISABLE=0
build --define=PYTHON_DISABLE=0
coverage --define=PYTHON_DISABLE=0
test --define=PYTHON_DISABLE=0
# sometimes failed logs exceed this threshold
test --experimental_ui_max_stdouterr_bytes=104857600
# Sets the default Apple platform to macOS.
build --apple_platform_type=macos
build -c opt
build --copt=-DGRPC_BAZEL_BUILD
# fixing debug builds with ignore warnings
build --copt=-O2
# LLVM, MLIR and TF require C++14, we use C++17 in project
build --cxxopt=-std=c++17
build --host_cxxopt=-std=c++17
# Security options
build --cxxopt=-fno-strict-overflow
build --cxxopt=-fno-delete-null-pointer-checks
build --cxxopt=-fwrapv
build --cxxopt=-fstack-protector
build --cxxopt=-fstack-clash-protection
build --cxxopt=-Wformat
build --cxxopt=-Wformat-security
build --cxxopt=-Werror=format-security
# 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 --experimental_repo_remote_exec
build --force_pic
build --experimental_cc_shared_library
build --check_visibility=true
build --cxxopt=-DOVMS_DUMP_TO_FILE=0
coverage --cxxopt=-DOVMS_DUMP_TO_FILE=0
test --cxxopt=-DOVMS_DUMP_TO_FILE=0