config.cmake 1.42 KB
Newer Older
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
#--------------------------------------------------------------------
#  Template custom cmake configuration for compiling
#
#  This file is used to override the build options in build.
#  If you want to change the configuration, please use the following
#  steps. Assume you are on the root directory. First copy the this
#  file so that any local changes will be ignored by git
#
#  $ mkdir build
#  $ cp cmake/config.cmake build
#
#  Next modify the according entries, and then compile by
#
#  $ cd build
#  $ cmake ..
#
#  Then buld in parallel with 8 threads
#
#  $ make -j8
#--------------------------------------------------------------------

#---------------------------------------------
# Backend runtimes.
#---------------------------------------------

# Whether enable CUDA during compile,
#
# Possible values:
# - ON: enable CUDA with cmake's auto search
# - OFF: disable CUDA
# - /path/to/cuda: use specific path to cuda toolkit
set(USE_CUDA OFF)

#---------------------------------------------
# Misc.
#---------------------------------------------
Zhi Lin's avatar
Zhi Lin committed
37
# Whether to build cpp unittest executables.
38
set(BUILD_CPP_TEST OFF)
39

Zhi Lin's avatar
Zhi Lin committed
40
# Whether to enable OpenMP.
41
set(USE_OPENMP ON)
42

Zhi Lin's avatar
Zhi Lin committed
43
# Whether to enable Intel's avx optimized kernel.
44
set(USE_AVX ON)
45

Zhi Lin's avatar
Zhi Lin committed
46
# Whether to build PyTorch plugins.
47
set(BUILD_TORCH ON)
Zhi Lin's avatar
Zhi Lin committed
48
49
50
51

# Whether to enable CUDA kernels compiled with TVM.
set(USE_TVM OFF)

52
53
# Whether to enable fp16 to support mixed precision training.
set(USE_FP16 OFF)