-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy path.bazelrc
60 lines (43 loc) · 2.67 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
# Import TensorFlow's configuration first.
try-import %workspace%/.tensorflow.bazelrc
# Prevent invalid caching if input files are modified during a build.
build --experimental_guard_against_concurrent_changes
# Allow up to 10 Mb of logging
build --experimental_ui_max_stdouterr_bytes=10485760
# Disable visibility checks (works around some private deps in TensorFlow)
build --nocheck_visibility
# Disable framework_shared_object for all LCE builds and tests.
build --config=monolithic
# Make sure tests are quick and -DNDEBUG is *not* set
test --compilation_mode=fastbuild
test --cxxopt -DTF_LITE_DISABLE_X86_NEON
# Enable Ruy
build --copt=-DTFLITE_WITH_RUY
# Disable XLA
build --define=with_xla_support=false
# Disable MKL
build --define=enable_mkl=false --define=build_with_mkl=false --define=tensorflow_mkldnn_contraction_kernel=0
# Config for a 32-bit Raspberry Pi - can be activated using --config=rpi3
build:rpi3 --config=elinux_armhf
build:rpi3 --copt=-march=armv7-a --copt=-mfpu=neon-vfpv4 --copt=-std=gnu++11 --copt=-DS_IREAD=S_IRUSR --copt=-DS_IWRITE=S_IWUSR --copt=-fno-tree-pre --copt=-U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 --copt=-U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 --copt=-U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 --define=raspberry_pi_with_neon=true --copt=-funsafe-math-optimizations --copt=-ftree-vectorize --copt=-fomit-frame-pointer --verbose_failures
# Config for 64-bit ARM - can be activated using --config=aarch64
build:aarch64 --config=elinux_aarch64
build:aarch64 --copt=-march=armv8-a --copt=-std=gnu++11 --copt=-DS_IREAD=S_IRUSR --copt=-DS_IWRITE=S_IWUSR --copt=-fno-tree-pre --copt=-U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 --copt=-U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 --copt=-U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 --copt=-funsafe-math-optimizations --copt=-ftree-vectorize --copt=-fomit-frame-pointer --verbose_failures
# Disable unnecessary features.
build:linux --config=nohdfs --config=nonccl --config=noaws --config=nogcp
build:macos --config=nohdfs --config=nonccl --config=noaws --config=nogcp
build:windows --config=noaws --config=nogcp
# Extra build options we need for windows.
build:windows --experimental_strict_action_env=true
# Disable certain warnings that come from TF code and pollute logs
build:android --copt=-Wno-deprecated-declarations
build:linux --copt=-Wno-deprecated-declarations
build:linux --host_copt=-Wno-deprecated-declarations
build:macos --copt=-Wno-deprecated-declarations
# Windows generates *a lot* of warnings; disable them all.
build:windows --copt=/W0
# Config-specific options should come above this line.
# Options from ./configure
try-import %workspace%/.lce_configure.bazelrc
# Put user-specific options in .bazelrc.user
try-import %workspace%/.bazelrc.user