Add cmake option of custom op support (#335)
Co-authored-by: zhouheng.zheng <zhouheng.zheng@ouotlook.com>
This commit is contained in:
parent
f2e71a3deb
commit
d1b57e8eca
|
|
@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.14)
|
||||||
project(tim-vx LANGUAGES C CXX)
|
project(tim-vx LANGUAGES C CXX)
|
||||||
|
|
||||||
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
|
option(BUILD_SHARED_LIBS "Build using shared libraries" ON)
|
||||||
|
option(TIM_VX_ENABLE_CUSTOM_OP "Enable custom op support" OFF)
|
||||||
option(TIM_VX_ENABLE_TEST "Build the unit test" OFF)
|
option(TIM_VX_ENABLE_TEST "Build the unit test" OFF)
|
||||||
option(TIM_VX_ENABLE_LAYOUT_INFER "Enable layout inference support" ON)
|
option(TIM_VX_ENABLE_LAYOUT_INFER "Enable layout inference support" ON)
|
||||||
option(TIM_VX_ENABLE_NBG_PARSER "Enable NBG parser" OFF)
|
option(TIM_VX_ENABLE_NBG_PARSER "Enable NBG parser" OFF)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
add_subdirectory("benchmark_test")
|
add_subdirectory("benchmark_test")
|
||||||
|
if(${TIM_VX_ENABLE_CUSTOM_OP})
|
||||||
add_subdirectory("custom_op_test")
|
add_subdirectory("custom_op_test")
|
||||||
|
endif()
|
||||||
|
|
||||||
add_subdirectory("lenet")
|
add_subdirectory("lenet")
|
||||||
if(${TIM_VX_ENABLE_VIPLITE})
|
if(${TIM_VX_ENABLE_VIPLITE})
|
||||||
add_subdirectory("lenet_lite")
|
add_subdirectory("lenet_lite")
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,10 @@ set(TARGET_NAME "tim-vx")
|
||||||
aux_source_directory(./vx VX_SRC)
|
aux_source_directory(./vx VX_SRC)
|
||||||
aux_source_directory(./vx/ops OPS_SRC)
|
aux_source_directory(./vx/ops OPS_SRC)
|
||||||
|
|
||||||
|
if(NOT ${TIM_VX_ENABLE_CUSTOM_OP})
|
||||||
|
list(REMOVE_ITEM OPS_SRC "./vx/ops/custom_base.cc")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(${TARGET_NAME}_SRCS)
|
set(${TARGET_NAME}_SRCS)
|
||||||
list(APPEND ${TARGET_NAME}_SRCS
|
list(APPEND ${TARGET_NAME}_SRCS
|
||||||
${VX_SRC}
|
${VX_SRC}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue