Add cmake option of custom op support (#335)

Co-authored-by: zhouheng.zheng <zhouheng.zheng@ouotlook.com>
This commit is contained in:
Zhouheng Zheng 2022-03-28 09:42:19 +08:00 committed by GitHub
parent f2e71a3deb
commit d1b57e8eca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 1 deletions

View File

@ -2,6 +2,7 @@ cmake_minimum_required (VERSION 3.14)
project(tim-vx LANGUAGES C CXX)
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_LAYOUT_INFER "Enable layout inference support" ON)
option(TIM_VX_ENABLE_NBG_PARSER "Enable NBG parser" OFF)

View File

@ -1,5 +1,8 @@
add_subdirectory("benchmark_test")
if(${TIM_VX_ENABLE_CUSTOM_OP})
add_subdirectory("custom_op_test")
endif()
add_subdirectory("lenet")
if(${TIM_VX_ENABLE_VIPLITE})
add_subdirectory("lenet_lite")

View File

@ -5,6 +5,10 @@ set(TARGET_NAME "tim-vx")
aux_source_directory(./vx VX_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)
list(APPEND ${TARGET_NAME}_SRCS
${VX_SRC}