-
Notifications
You must be signed in to change notification settings - Fork 231
/
.bazelrc
119 lines (97 loc) · 3.83 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Tachyon Bazel configuration file.
# This file tries to group and simply build option for Tachyon
#
# ----CONFIG OPTIONS----
#
# Other build options:
# dbg: Build with debug info
#
# Hardware support options:
# cuda: Build with NVIDIA GPU support (cuda).
# rocm: Build with AMD GPU support (rocm).
# numa: Enable numa using hwloc.
#
# Default build options. These are applied first and unconditionally.
# For projects which use Tachyon as part of a Bazel build process, putting
# nothing in a bazelrc will default to a monolithic build. The following line
# opts in to modular op registration support by default.
build -c opt
# Make Bazel print out all options from rc files.
build --announce_rc
# TODO(chokobole): Remove when `cc_shared_library` is enabled by default
build --experimental_cc_shared_library
# Enable platform specific configurations by default depending on host machine.
common --enable_platform_specific_config
build:macos_x86_64 --config=macos
build:macos_x86_64 --cpu=darwin_x86_64
build:macos_x86_64 --host_cpu=darwin_x86_64
build:macos_arm64 --config=macos
build:macos_arm64 --cpu=darwin_arm64
build:macos_arm64 --host_cpu=darwin_arm64
# This config refers to building sources with nvcc.
build:cuda --repo_env TACHYON_NEED_CUDA=1
build:cuda --crosstool_top=@local_config_cuda//crosstool:toolchain
build:cuda --@local_config_cuda//:enable_cuda
build:cuda --//:has_rtti
# This config refers to building sources with clang.
# NOTE(chokobole): I didn't test it, though!
build:cuda_clang --config=cuda
build:cuda_clang --repo_env TACHYON_CUDA_CLANG=1
build:cuda_clang --@local_config_cuda//:cuda_compiler=clang
# This config refers to building sources kernels.
build:rocm --crosstool_top=@local_config_rocm//crosstool:toolchain
build:rocm --define=using_rocm_hipcc=true
build:rocm --define=tensorflow_mkldnn_contraction_kernel=0
build:rocm --repo_env TACHYON_NEED_ROCM=1
# Options extracted from configure script
build:numa --//:has_numa
# Fastbuild config
build:fastbuild -c fastbuild
# Debug config
build:dbg -c dbg
# Opt config
build:opt -c opt
build:opt --//:has_openmp
build:maxopt -c opt
build:maxopt --//:has_openmp
build:maxopt --config=native
build:maxopt --copt=-flto
build:maxopt --linkopt=-flto
# By default, build Tachyon in C++ 17 mode.
build:linux --cxxopt=-std=c++17
build:linux --host_cxxopt=-std=c++17
build:macos --cxxopt=-std=c++17
build:macos --host_cxxopt=-std=c++17
build:macos --objccopt=-std=c++17
build:windows --cxxopt=/std:c++17
build:windows --host_cxxopt=/std:c++17
# Instruction set optimizations
# TODO(chokobole): Create a feature in toolchains for avx/avx2 to
# avoid having to define linux/win separately.
build:avx_linux --copt=-mavx
build:avx2_linux --copt=-mavx2
build:avx512_linux --copt=-mavx512f
build:avx_windows --copt=/arch=AVX
build:avx2_windows --copt=/arch=AVX2
build:avx512_windows --copt=/arch=AVX512
# Compile for the native architecture
# WARN(batzor): this will make the build non-portable
build:native --copt=-march=native
# Enable googletest build with absl.
# See https://github.com/google/googletest/blob/v1.13.0/BUILD.bazel#L67C1-L70
build --define absl=1
# FIXME(chokobole): If this option is enabled, gtest cannot be built with nvcc.
build:cuda --define absl=0
# gmp needs exception.
build --//:has_exception
test --test_tag_filters -benchmark,-manual,-cuda,-rust
# TODO(GideokKim): Currently, NTT operates assuming that GPU memory is always
# sufficient. Until the issue is resolved, add a tag to manually test in cuda
# tests.
test:cuda --test_tag_filters -benchmark,-manual,-cuda,-rust,-gpu_heavy_test
build:linux --build_tag_filters -objc,-cuda,-rust
build:macos --build_tag_filters -cuda,-rust,-doxygen
build:windows --build_tag_filters -objc,-cuda,-rust,-doxygen
# Config-specific options should come above this line.
# Load rc file with user-specific options.
try-import %workspace%/.bazelrc.user