|
|
|
@@ -9,17 +9,19 @@ file(GLOB KERNEL_SRC |
|
|
|
list(REMOVE_ITEM KERNEL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/int8/opt_op_handler.cc) |
|
|
|
|
|
|
|
if (SUPPORT_TRAIN) |
|
|
|
file (GLOB TRAIN_KERNEL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/fp32_grad/*.cc) |
|
|
|
set(KERNEL_SRC ${KERNEL_SRC} ${TRAIN_KERNEL_SRC}) |
|
|
|
file (GLOB TRAIN_KERNEL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/fp32_grad/*.cc) |
|
|
|
set(KERNEL_SRC ${KERNEL_SRC} ${TRAIN_KERNEL_SRC}) |
|
|
|
endif() |
|
|
|
|
|
|
|
add_library(cpu_kernel_mid OBJECT ${KERNEL_SRC}) |
|
|
|
add_dependencies(cpu_kernel_mid fbs_src) |
|
|
|
|
|
|
|
if (PLATFORM_ARM64) |
|
|
|
file(GLOB FP16_KERNEL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/fp16/*.cc) |
|
|
|
add_library(cpu_fp16_kernel_mid OBJECT ${FP16_KERNEL_SRC}) |
|
|
|
file(GLOB OPT_KERNEL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/int8/opt_op_handler.cc) |
|
|
|
add_library(cpu_opt_kernel_mid OBJECT ${OPT_KERNEL_SRC}) |
|
|
|
if (ENABLE_FP16) |
|
|
|
file(GLOB FP16_KERNEL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/fp16/*.cc) |
|
|
|
add_library(cpu_fp16_kernel_mid OBJECT ${FP16_KERNEL_SRC}) |
|
|
|
endif () |
|
|
|
file(GLOB OPT_KERNEL_SRC ${CMAKE_CURRENT_SOURCE_DIR}/int8/opt_op_handler.cc) |
|
|
|
add_library(cpu_opt_kernel_mid OBJECT ${OPT_KERNEL_SRC}) |
|
|
|
endif () |
|
|
|
|