config.cmake 5.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you 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.

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
#--------------------------------------------------------------------
#  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 ..
#
HarryWu committed
34
#  Then build in parallel with 8 threads
35 36 37 38 39 40 41
#
#  $ make -j8
#--------------------------------------------------------------------

#---------------------------------------------
# Backend runtimes.
#---------------------------------------------
42 43 44 45 46

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

51 52 53 54
# Whether enable ROCM runtime
#
# Possible values:
# - ON: enable ROCM with cmake's auto search
55
# - OFF: disable ROCM
56
# - /path/to/rocm: use specific path to rocm
57 58
set(USE_ROCM OFF)

59 60 61
# Whether enable SDAccel runtime
set(USE_SDACCEL OFF)

62 63 64
# Whether enable Intel FPGA SDK for OpenCL (AOCL) runtime
set(USE_AOCL OFF)

65 66 67 68 69 70 71
# Whether enable OpenCL runtime
set(USE_OPENCL OFF)

# Whether enable Metal runtime
set(USE_METAL OFF)

# Whether enable Vulkan runtime
72 73 74
#
# Possible values:
# - ON: enable Vulkan with cmake's auto search
75
# - OFF: disable vulkan
76
# - /path/to/vulkan-sdk: use specific path to vulkan-sdk
77 78
set(USE_VULKAN OFF)

79 80 81
# Whether enable OpenGL runtime
set(USE_OPENGL OFF)

82 83 84
# Whether enable MicroTVM runtime
set(USE_MICRO OFF)

nhynes committed
85 86 87 88 89 90 91 92 93 94 95
# Whether to enable SGX runtime
#
# Possible values for USE_SGX:
# - /path/to/sgxsdk: path to Intel SGX SDK
# - OFF: disable SGX
#
# SGX_MODE := HW|SIM
set(USE_SGX OFF)
set(SGX_MODE "SIM")
set(RUST_SGX_SDK "/path/to/rust-sgx-sdk")

96 97 98
# Whether enable RPC runtime
set(USE_RPC ON)

99 100 101
# Whether embed stackvm into the runtime
set(USE_STACKVM_RUNTIME OFF)

102 103 104 105 106 107
# Whether enable tiny embedded graph runtime.
set(USE_GRAPH_RUNTIME ON)

# Whether enable additional graph debug functions
set(USE_GRAPH_RUNTIME_DEBUG OFF)

108 109 110
# Whether enable additional vm profiler functions
set(USE_VM_PROFILER OFF)

111
# Whether enable uTVM standalone runtime
112
set(USE_MICRO_STANDALONE_RUNTIME OFF)
113

114 115 116 117
# Whether build with LLVM support
# Requires LLVM version >= 4.0
#
# Possible values:
118
# - ON: enable llvm with cmake's find search
119
# - OFF: disable llvm
120
# - /path/to/llvm-config: enable specific LLVM when multiple llvm-dev is available.
121 122 123 124 125
set(USE_LLVM OFF)

#---------------------------------------------
# Contrib libraries
#---------------------------------------------
126
# Whether use BLAS, choices: openblas, mkl, atlas, apple
127 128
set(USE_BLAS none)

129 130 131
# /path/to/mkl: mkl root path when use mkl blas library
# set(USE_MKL_PATH /opt/intel/mkl) for UNIX
# set(USE_MKL_PATH ../IntelSWTools/compilers_and_libraries_2018/windows/mkl) for WIN32
132
# set(USE_MKL_PATH <path to venv or site-packages directory>) if using `pip install mkl`
133 134
set(USE_MKL_PATH none)

135 136 137
# Whether use MKLDNN library
set(USE_MKLDNN OFF)

138 139 140 141
# Whether use OpenMP thread pool, choices: gnu, intel
# Note: "gnu" uses gomp library, "intel" uses iomp5 library
set(USE_OPENMP none)

142 143 144 145 146 147
# Whether use contrib.random in runtime
set(USE_RANDOM OFF)

# Whether use NNPack
set(USE_NNPACK OFF)

148 149 150 151 152 153 154 155 156
# Possible values:
# - ON: enable tflite with cmake's find search
# - OFF: disable tflite
# - /path/to/libtensorflow-lite.a: use specific path to tensorflow lite library 
set(USE_TFLITE OFF)

# /path/to/tensorflow: tensorflow root path when use tflite library
set(USE_TENSORFLOW_PATH none)

157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172
# Whether use CuDNN
set(USE_CUDNN OFF)

# Whether use cuBLAS
set(USE_CUBLAS OFF)

# Whether use MIOpen
set(USE_MIOPEN OFF)

# Whether use MPS
set(USE_MPS OFF)

# Whether use rocBlas
set(USE_ROCBLAS OFF)

# Whether use contrib sort
173
set(USE_SORT ON)
174

Zhi committed
175 176 177
# Whether use MKL-DNN (DNNL) codegen
set(USE_DNNL_CODEGEN OFF)

178
# Build ANTLR parser for Relay text format
179 180 181 182
# Possible values:
# - ON: enable ANTLR by searching default locations (cmake find_program for antlr4 and /usr/local for jar)
# - OFF: disable ANTLR
# - /path/to/antlr-*-complete.jar: path to specific ANTLR jar file
183
set(USE_ANTLR OFF)
184

185 186
# Whether use Relay debug mode
set(USE_RELAY_DEBUG OFF)
187 188 189 190 191 192 193 194 195

# Whether to build fast VTA simulator driver
set(USE_VTA_FSIM ON)

# Whether to build cycle-accurate VTA simulator driver
set(USE_VTA_TSIM ON)

# Whether to build VTA FPGA driver (device side only)
set(USE_VTA_FPGA OFF)
196 197 198

# Whether to build the example external runtime module
set(USE_EXAMPLE_EXT_RUNTIME OFF)