提交 0548faec 编写于 作者: T tensor-tang

enable arm math lib

上级 51b5fdde
...@@ -6,40 +6,77 @@ if(NOT (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM)) ...@@ -6,40 +6,77 @@ if(NOT (LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND LITE_WITH_ARM))
return() return()
endif() endif()
# TODO(xxx): seperate them set(HAS_ARM_MATH_LIB_DIR OFF)
lite_cc_library(math_arm SRCS # will search name as "libmath_arm.${os}.${abi}.${lang}.a"
funcs.cc if(ARM_MATH_LIB_DIR AND EXISTS "${ARM_MATH_LIB_DIR}")
packed_sgemm.cc set(arm_math_name "")
softmax.cc if(ARM_TARGET_OS STREQUAL "android")
scale.cc if(ARM_TARGET_ARCH_ABI STREQUAL "armv8")
pooling.cc set(arm_math_name "math_arm.android.armv8")
elementwise.cc elseif(ARM_TARGET_ARCH_ABI STREQUAL "armv7")
concat.cc set(arm_math_name "math_arm.android.armv7")
sgemv.cc endif()
type_trans.cc endif()
conv_impl.cc
conv_direct_3x3s1.cc if(ARM_TARGET_OS STREQUAL "armlinux" )
conv_direct_3x3s2.cc if(ARM_TARGET_ARCH_ABI STREQUAL "armv8")
conv_direct.cc set(arm_math_name "math_arm.armlinux.armv8")
conv_depthwise_3x3_int7.cc elseif(ARM_TARGET_ARCH_ABI STREQUAL "armv7")
conv_depthwise_3x3_int8.cc set(arm_math_name "math_arm.armlinux.armv7")
conv_depthwise_5x5s1_int8.cc endif()
conv_depthwise_3x3p0.cc endif()
conv_depthwise_3x3p1.cc
conv_depthwise_5x5s1.cc if(ARM_TARGET_LANG STREQUAL "clang")
conv_depthwise_5x5s2.cc set(arm_math_name "${arm_math_name}.clang")
conv_depthwise.cc else()
conv_gemmlike.cc set(arm_math_name "${arm_math_name}.gcc")
conv_winograd_3x3.cc endif()
conv_winograd.cc
split.cc find_library(math_arm_file ${arm_math_name} ${ARM_MATH_LIB_DIR} NO_DEFAULT_PATH)
activation.cc if(math_arm_file)
dropout.cc add_library(math_arm STATIC IMPORTED GLOBAL)
gemm_prepacked_int8.cc set_property(TARGET math_arm PROPERTY IMPORTED_LOCATION ${math_arm_file})
gemv_arm_int8.cc message(STATUS "ARM math library imported: ${math_arm_file}")
conv3x3s1_direct_int8.cc set(HAS_ARM_MATH_LIB_DIR ON)
conv3x3s2_direct_int8.cc else()
DEPS ${lite_kernel_deps} eigen3 framework_proto_lite) message(WARNING "Can not find arm math library ${arm_math_name} in ${ARM_MATH_LIB_DIR")
# TODO(TJ): fix me do not deps proto endif()
endif()
if (NOT HAS_ARM_MATH_LIB_DIR)
# TODO(xxx): seperate them and do not deps proto, eigen3
cc_library(math_arm SRCS
funcs.cc
packed_sgemm.cc
softmax.cc
scale.cc
pooling.cc
elementwise.cc
concat.cc
sgemv.cc
type_trans.cc
conv_impl.cc
conv_direct_3x3s1.cc
conv_direct_3x3s2.cc
conv_direct.cc
conv_depthwise_3x3_int7.cc
conv_depthwise_3x3_int8.cc
conv_depthwise_5x5s1_int8.cc
conv_depthwise_3x3p0.cc
conv_depthwise_3x3p1.cc
conv_depthwise_5x5s1.cc
conv_depthwise_5x5s2.cc
conv_depthwise.cc
conv_gemmlike.cc
conv_winograd_3x3.cc
conv_winograd.cc
split.cc
activation.cc
dropout.cc
gemm_prepacked_int8.cc
gemv_arm_int8.cc
conv3x3s1_direct_int8.cc
conv3x3s2_direct_int8.cc
DEPS ${lite_kernel_deps} eigen3 framework_proto_lite)
endif()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册