From b4ec6c3be7f54cce733d1b6e7977184c65573df0 Mon Sep 17 00:00:00 2001 From: yanghongtian Date: Thu, 16 Apr 2020 19:06:58 +0800 Subject: [PATCH] fixed linking ascend library --- cmake/device/hw_ascend_npu.cmake | 132 ++++++++++++------ lite/backends/hw_ascend_npu/CMakeLists.txt | 9 +- lite/core/arena/CMakeLists.txt | 15 +- lite/core/arena/framework.cc | 3 +- lite/kernels/hw_ascend_npu/CMakeLists.txt | 9 +- .../hw_ascend_npu/bridges/CMakeLists.txt | 16 ++- lite/kernels/hw_ascend_npu/bridges/act_op.cc | 4 - .../bridges/paddle_use_bridges.h | 69 +++++++++ lite/kernels/hw_ascend_npu/bridges/utility.cc | 8 +- .../kernels/hw_ascend_npu/subgraph_compute.cc | 2 +- lite/tests/kernels/CMakeLists.txt | 105 +++++++------- 11 files changed, 259 insertions(+), 113 deletions(-) create mode 100644 lite/kernels/hw_ascend_npu/bridges/paddle_use_bridges.h diff --git a/cmake/device/hw_ascend_npu.cmake b/cmake/device/hw_ascend_npu.cmake index 45672a51c3..6a4b95192b 100644 --- a/cmake/device/hw_ascend_npu.cmake +++ b/cmake/device/hw_ascend_npu.cmake @@ -32,37 +32,25 @@ endif() include_directories("${ACL_INC}") -# find ascendcl library -find_library(ACL_LIB_FILE NAMES ascendcl PATHS ${ASCEND_HOME}/acllib/lib64) -if(NOT ACL_LIB_FILE) - message(FATAL_ERROR "Can not find ACL Library in ${ASCEND_HOME}/acllib/lib64") -else() - message(STATUS "Found ACL Library: ${ACL_LIB_FILE}") - add_library(acl_lib SHARED IMPORTED GLOBAL) - set_property(TARGET acl_lib PROPERTY IMPORTED_LOCATION ${ACL_LIB_FILE}) -endif() +set(ACL_LIB_FILES + acl_dvpp + ascendcl + register + runtime + ) -# find register library -find_library(REG_LIB_FILE NAMES register PATHS ${ASCEND_HOME}/acllib/lib64) -if(NOT REG_LIB_FILE) - message(FATAL_ERROR "Can not find REG Library in ${ASCEND_HOME}/acllib/lib64") -else() - message(STATUS "Found REG Library: ${REG_LIB_FILE}") - add_library(register_lib SHARED IMPORTED GLOBAL) - set_property(TARGET register_lib PROPERTY IMPORTED_LOCATION ${REG_LIB_FILE}) -endif() +foreach (libname ${ACL_LIB_FILES}) + find_library(lib_name_path_${libname} NAMES ${libname} PATHS ${ASCEND_HOME}/acllib/lib64) + if (lib_name_path_${libname}) + add_library(acl_${libname} SHARED IMPORTED GLOBAL) + set_property(TARGET acl_${libname} PROPERTY IMPORTED_LOCATION ${lib_name_path_${libname}}) + list(APPEND acl_libs acl_${libname}) + else() + message(FATAL_ERROR "can not find library: ${libname}") + endif() +endforeach() - -find_library(RT_LIB_FILE NAMES runtime PATHS ${ASCEND_HOME}/acllib/lib64) -if(NOT RT_LIB_FILE) - message(FATAL_ERROR "Can not find RT Library in ${ASCEND_HOME}/acllib/lib64") -else() - message(STATUS "Found RT Library: ${RT_LIB_FILE}") - add_library(runtime_lib SHARED IMPORTED GLOBAL) - set_property(TARGET runtime_lib PROPERTY IMPORTED_LOCATION ${RT_LIB_FILE}) -endif() - -set(hw_ascend_npu_runtime_libs acl_lib register_lib runtime_lib CACHE INTERNAL "ascend runtime libs") +set(hw_ascend_npu_runtime_libs ${acl_libs} CACHE INTERNAL "ascend runtime libs") # find atc include folder and library find_path(ATC_INC NAMES ge/ge_ir_build.h @@ -72,14 +60,49 @@ if (NOT ATC_INC) endif() include_directories("${ATC_INC}") -find_library(GRAPH_LIB_FILE graph PATHS ${ASCEND_HOME}/atc/lib64) -if (NOT GRAPH_LIB_FILE) - message(FATAL_ERROR "Can not find libgraph.so library in ${ASCEND_HOME}/atc/lib64") -else() - message(STATUS "Found Graph Library: ${GRAPH_LIB_FILE}") - add_library(graph_lib SHARED IMPORTED GLOBAL) - set_property(TARGET graph_lib PROPERTY IMPORTED_LOCATION ${GRAPH_LIB_FILE}) -endif() +set(ATC_LIB_FILES + _caffe_parser + auto_tiling + c_sec + cce + cce_aicore + cce_aicpudev_online + cce_tools + drvdevdrv + drvdevmm + drvdsmi_host + drvhdc_host + fmk_caffe_parser + fmk_tensorflow_parser + ge_client + ge_common + ge_compiler + ge_executor + graph + mmpa + msprof + parser_common + register + resource + runtime + slog + te_fusion + tiling + tvm + tvm_runtime + tvm_topi + ) + +foreach (libname ${ATC_LIB_FILES}) + find_library(lib_name_path_${libname} NAMES ${libname} PATHS ${ASCEND_HOME}/atc/lib64) + if (lib_name_path_${libname}) + add_library(atc_${libname} SHARED IMPORTED GLOBAL) + set_property(TARGET atc_${libname} PROPERTY IMPORTED_LOCATION ${lib_name_path_${libname}}) + list(APPEND atc_libs atc_${libname}) + else() + message(FATAL_ERROR "can not find library: ${libname}") + endif() +endforeach() # find opp include folder and library find_path(OPP_INC NAMES all_ops.h @@ -89,14 +112,37 @@ if (NOT OPP_INC) endif() include_directories("${OPP_INC}") -find_library(OPP_LIB_FILE opsproto PATHS ${ASCEND_HOME}/opp/op_proto/built-in) -if (NOT OPP_LIB_FILE) +find_library(OPP_OPSPROTO_LIB_FILE opsproto PATHS ${ASCEND_HOME}/opp/op_proto/built-in) +if (NOT OPP_OPSPROTO_LIB_FILE) message(FATAL_ERROR "Can not find libopsproto.so in ${ASCEND_HOME}/opp/op_proto/built-in") else() - message(STATUS "Found OPP Library: ${OPP_LIB_FILE}") - add_library(opp_lib SHARED IMPORTED GLOBAL) - set_property(TARGET opp_lib PROPERTY IMPORTED_LOCATION ${OPP_LIB_FILE}) + message(STATUS "Found OPP proto Library: ${OPP_OPSPROTO_LIB_FILE}") + add_library(opp_opsproto_lib SHARED IMPORTED GLOBAL) + set_property(TARGET opp_opsproto_lib PROPERTY IMPORTED_LOCATION ${OPP_OPSPROTO_LIB_FILE}) +endif() + +find_library(OPP_FUSION_AICORE ops_fusion_pass_aicore PATHS ${ASCEND_HOME}/opp/fusion_pass/built_in/) +if (NOT OPP_FUSION_AICORE) + message(FATAL_ERROR "Can not find libops_fusion_pass_aicore.so in ${ASCEND_HOME}/opp/fusion_pass/built_in/") +else() + message(STATUS "Found fusion_pass_aicore Library: ${OPP_FUSION_AICORE}") + add_library(opp_fusion_pass_aicore_lib SHARED IMPORTED GLOBAL) + set_property(TARGET opp_fusion_pass_aicore_lib PROPERTY IMPORTED_LOCATION ${OPP_FUSION_AICORE}) +endif() + +find_library(OPP_FUSION_VECTORCORE ops_fusion_pass_vectorcore PATHS ${ASCEND_HOME}/opp/fusion_pass/built_in/vector_core) +if (NOT OPP_FUSION_VECTORCORE) + message(FATAL_ERROR "Can not find libops_fusion_pass_vectorcore.so in ${ASCEND_HOME}/opp/fusion_pass/built_in/vector_core") +else() + message(STATUS "Found fusion_pass_vectorcore Library: ${OPP_FUSION_VECTORCORE}") + add_library(opp_fusion_pass_vectorcore_lib SHARED IMPORTED GLOBAL) + set_property(TARGET opp_fusion_pass_vectorcore_lib PROPERTY IMPORTED_LOCATION ${OPP_FUSION_VECTORCORE}) endif() -set(hw_ascend_npu_builder_libs graph_lib opp_lib CACHE INTERNAL "ascend builder libs") +set(hw_ascend_npu_builder_libs + ${atc_libs} + opp_opsproto_lib + opp_fusion_pass_aicore_lib + opp_fusion_pass_vectorcore_lib + CACHE INTERNAL "ascend builder libs") diff --git a/lite/backends/hw_ascend_npu/CMakeLists.txt b/lite/backends/hw_ascend_npu/CMakeLists.txt index a412e22884..5d36148caf 100644 --- a/lite/backends/hw_ascend_npu/CMakeLists.txt +++ b/lite/backends/hw_ascend_npu/CMakeLists.txt @@ -1,14 +1,13 @@ if(NOT LITE_WITH_HW_ASCEND_NPU) return() endif() -lite_cc_library(runtime_hw_ascend_npu SRCS runtime.cc DEPS - ${hw_ascend_npu_builder_libs} - ${hw_ascend_npu_runtime_libs}) + lite_cc_library(target_wrapper_hw_ascend_npu SRCS target_wrapper.cc DEPS - ${hw_ascend_npu_builder_libs} ${hw_ascend_npu_runtime_libs}) +lite_cc_library(runtime_hw_ascend_npu SRCS runtime.cc DEPS + ${hw_ascend_npu_runtime_libs} + target_wrapper_hw_ascend_npu) lite_cc_library(device_hw_ascend_npu SRCS device.cc DEPS - ${hw_ascend_npu_builder_libs} ${hw_ascend_npu_runtime_libs} target_wrapper_hw_ascend_npu runtime_hw_ascend_npu) diff --git a/lite/core/arena/CMakeLists.txt b/lite/core/arena/CMakeLists.txt index afc1040736..098d012381 100644 --- a/lite/core/arena/CMakeLists.txt +++ b/lite/core/arena/CMakeLists.txt @@ -6,5 +6,18 @@ endif() lite_cc_library(arena_framework SRCS framework.cc DEPS program gtest) if((NOT LITE_WITH_OPENCL) AND (LITE_WITH_X86 OR LITE_WITH_ARM)) - lite_cc_test(test_arena_framework SRCS framework_test.cc DEPS arena_framework ${mlu_kernels} ${bm_kernels} ${npu_kernels} ${xpu_kernels} ${x86_kernels} ${cuda_kernels} ${fpga_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) + lite_cc_test(test_arena_framework SRCS framework_test.cc DEPS + arena_framework + ${mlu_kernels} + ${bm_kernels} + ${npu_kernels} + ${xpu_kernels} + ${x86_kernels} + ${cuda_kernels} + ${fpga_kernels} + ${arm_kernels} + ${lite_ops} + ${host_kernels} + ${hw_ascend_npu_kernels} + ) endif() diff --git a/lite/core/arena/framework.cc b/lite/core/arena/framework.cc index 614ee990a9..9f705db119 100644 --- a/lite/core/arena/framework.cc +++ b/lite/core/arena/framework.cc @@ -22,7 +22,8 @@ namespace arena { void TestCase::CreateInstruction() { std::shared_ptr op = nullptr; - if (place_.target == TARGET(kNPU) || place_.target == TARGET(kXPU)) { + if (place_.target == TARGET(kNPU) || place_.target == TARGET(kXPU) || + place_.target == TARGET(kHWAscendNPU)) { // Create a new block desc to wrap the original op desc int sub_block_idx = 0; auto sub_block_desc = new cpp::BlockDesc(); diff --git a/lite/kernels/hw_ascend_npu/CMakeLists.txt b/lite/kernels/hw_ascend_npu/CMakeLists.txt index dbce1f82fd..df79bc9dd7 100644 --- a/lite/kernels/hw_ascend_npu/CMakeLists.txt +++ b/lite/kernels/hw_ascend_npu/CMakeLists.txt @@ -1,4 +1,9 @@ add_subdirectory(bridges) -add_kernel(subgraph_compute_hw_ascend_npu HWAscendNPU basic SRCS subgraph_compute.cc DEPS - ${lite_kernel_deps} device_hw_ascend_npu subgraph_bridge_engine ${hw_ascend_npu_subgraph_bridges}) +add_kernel(subgraph_compute_hw_ascend_npu HW_ASCEND_NPU basic SRCS subgraph_compute.cc DEPS + ${lite_kernel_deps} + device_hw_ascend_npu + subgraph_bridge_engine + ${hw_ascend_npu_subgraph_bridges} + subgraph_bridge_registry + ) diff --git a/lite/kernels/hw_ascend_npu/bridges/CMakeLists.txt b/lite/kernels/hw_ascend_npu/bridges/CMakeLists.txt index bd2a276857..6884e9b20d 100644 --- a/lite/kernels/hw_ascend_npu/bridges/CMakeLists.txt +++ b/lite/kernels/hw_ascend_npu/bridges/CMakeLists.txt @@ -2,18 +2,24 @@ if (NOT LITE_WITH_HW_ASCEND_NPU) return() endif() -message(STATUS "======compile hw_ascend_npu bridges, ${hw_ascend_npu_builder_libs}") - lite_cc_library(subgraph_bridge_utility_hw_ascend_npu SRCS utility.cc DEPS ${hw_ascend_npu_builder_libs} tensor) lite_cc_library(subgraph_bridge_graph_hw_ascend_npu SRCS graph.cc - DEPS ${hw_ascend_npu_builder_libs} subgraph_bridge_utility_hw_ascend_npu) + DEPS ${hw_ascend_npu_builder_libs} subgraph_bridge_utility_hw_ascend_npu + ) + +set(hw_ascend_npu_subgraph_bridge_deps subgraph_bridge_registry subgraph_bridge_utility_hw_ascend_npu subgraph_bridge_graph_hw_ascend_npu) + +lite_cc_library(subgraph_bridge_act_op_hw_ascend_npu SRCS act_op.cc DEPS + ${hw_ascend_npu_builder_libs} + ${hw_ascend_npu_subgraph_bridge_deps}) set(hw_ascend_npu_subgraph_bridges subgraph_bridge_graph_hw_ascend_npu + subgraph_bridge_registry + subgraph_bridge_utility_hw_ascend_npu + subgraph_bridge_act_op_hw_ascend_npu CACHE INTERNAL "hw_ascend_npu_subgraph_bridges") - -lite_cc_library(subgraph_bridge_act_op_hw_ascend_npu SRCS act_op.cc DEPS ${hw_ascend_npu_subgraph_bridge_deps}) diff --git a/lite/kernels/hw_ascend_npu/bridges/act_op.cc b/lite/kernels/hw_ascend_npu/bridges/act_op.cc index f3905d7ba0..5bbf544f91 100644 --- a/lite/kernels/hw_ascend_npu/bridges/act_op.cc +++ b/lite/kernels/hw_ascend_npu/bridges/act_op.cc @@ -138,10 +138,6 @@ REGISTER_SUBGRAPH_BRIDGE( softplus, kHWAscendNPU, paddle::lite::subgraph::hw_ascend_npu::ActConverter); -REGISTER_SUBGRAPH_BRIDGE( - hard_sigmoid, - kHWAscendNPU, - paddle::lite::subgraph::hw_ascend_npu::ActConverter); REGISTER_SUBGRAPH_BRIDGE( log, diff --git a/lite/kernels/hw_ascend_npu/bridges/paddle_use_bridges.h b/lite/kernels/hw_ascend_npu/bridges/paddle_use_bridges.h new file mode 100644 index 0000000000..87d9c97d9b --- /dev/null +++ b/lite/kernels/hw_ascend_npu/bridges/paddle_use_bridges.h @@ -0,0 +1,69 @@ +// Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved. +// +// Licensed 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. + +#pragma once + +USE_SUBGRAPH_BRIDGE(sigmoid, kHWAscendNPU); +USE_SUBGRAPH_BRIDGE(relu, kHWAscendNPU); +USE_SUBGRAPH_BRIDGE(tanh, kHWAscendNPU); +/// USE_SUBGRAPH_BRIDGE(relu_clipped, kHWAscendNPU); +USE_SUBGRAPH_BRIDGE(relu6, kHWAscendNPU); +USE_SUBGRAPH_BRIDGE(leaky_relu, kHWAscendNPU); +USE_SUBGRAPH_BRIDGE(softsign, kHWAscendNPU); +/// USE_SUBGRAPH_BRIDGE(hard_sigmoid, kHWAscendNPU); +USE_SUBGRAPH_BRIDGE(log, kHWAscendNPU); +USE_SUBGRAPH_BRIDGE(sqrt, kHWAscendNPU); +USE_SUBGRAPH_BRIDGE(square, kHWAscendNPU); + +// USE_SUBGRAPH_BRIDGE(batch_norm, kNPU); +// USE_SUBGRAPH_BRIDGE(less_than, kNPU); +// USE_SUBGRAPH_BRIDGE(concat, kNPU); +// USE_SUBGRAPH_BRIDGE(conv2d, kNPU); +// USE_SUBGRAPH_BRIDGE(depthwise_conv2d, kNPU); +// USE_SUBGRAPH_BRIDGE(conv2d_transpose, kNPU); +// +// USE_SUBGRAPH_BRIDGE(dropout, kNPU); +// USE_SUBGRAPH_BRIDGE(elementwise_add, kNPU); +// USE_SUBGRAPH_BRIDGE(elementwise_sub, kNPU); +// USE_SUBGRAPH_BRIDGE(elementwise_mul, kNPU); +// USE_SUBGRAPH_BRIDGE(elementwise_div, kNPU); +// USE_SUBGRAPH_BRIDGE(fusion_elementwise_add_activation, kNPU); +// USE_SUBGRAPH_BRIDGE(fusion_elementwise_sub_activation, kNPU); +// USE_SUBGRAPH_BRIDGE(fusion_elementwise_mul_activation, kNPU); +// USE_SUBGRAPH_BRIDGE(fusion_elementwise_div_activation, kNPU); +// USE_SUBGRAPH_BRIDGE(fill_constant, kNPU) +// USE_SUBGRAPH_BRIDGE(fill_constant_batch_size_like, kNPU) +// +// USE_SUBGRAPH_BRIDGE(increment, kNPU); +// USE_SUBGRAPH_BRIDGE(instance_norm, kNPU); +// USE_SUBGRAPH_BRIDGE(fc, kNPU); +// USE_SUBGRAPH_BRIDGE(bilinear_interp, kNPU); +// USE_SUBGRAPH_BRIDGE(nearest_interp, kNPU); +// USE_SUBGRAPH_BRIDGE(layer_norm, kNPU); +// USE_SUBGRAPH_BRIDGE(matmul, kNPU); +// USE_SUBGRAPH_BRIDGE(mul, kNPU); +// USE_SUBGRAPH_BRIDGE(pad2d, kNPU); +// USE_SUBGRAPH_BRIDGE(pool2d, kNPU); +// USE_SUBGRAPH_BRIDGE(reduce_mean, kNPU); +// USE_SUBGRAPH_BRIDGE(reshape, kNPU); +// USE_SUBGRAPH_BRIDGE(reshape2, kNPU); +// USE_SUBGRAPH_BRIDGE(scale, kNPU); +// USE_SUBGRAPH_BRIDGE(shuffle_channel, kNPU); +// USE_SUBGRAPH_BRIDGE(softmax, kNPU); +// USE_SUBGRAPH_BRIDGE(split, kNPU); +//// USE_SUBGRAPH_BRIDGE(top_k, kNPU); +// USE_SUBGRAPH_BRIDGE(transpose, kNPU); +// USE_SUBGRAPH_BRIDGE(transpose2, kNPU); +// USE_SUBGRAPH_BRIDGE(unsqueeze, kNPU); +// USE_SUBGRAPH_BRIDGE(unsqueeze2, kNPU); diff --git a/lite/kernels/hw_ascend_npu/bridges/utility.cc b/lite/kernels/hw_ascend_npu/bridges/utility.cc index 7fe535096b..b6b60b0f77 100644 --- a/lite/kernels/hw_ascend_npu/bridges/utility.cc +++ b/lite/kernels/hw_ascend_npu/bridges/utility.cc @@ -82,8 +82,8 @@ ge::Format CvtDataLayoutType(DataLayoutType itype) { break; // TODO(yanghongtian): support more data layout type default: - LOG(FATAL) << "[HW_ASCEND_NPU] Can not convert data layout type(" - << DataLayoutToStr(itype) << ") from Lite to HW_ASCEND_NPU"; + LOG(FATAL) << "[HWAscendNPU] Can not convert data layout type(" + << DataLayoutToStr(itype) << ") from Lite to HWAscendNPU"; break; } return otype; @@ -91,7 +91,7 @@ ge::Format CvtDataLayoutType(DataLayoutType itype) { std::vector CvtShape(const std::vector& in_shape) { CHECK(in_shape.size() <= 4 && in_shape.size() > 0) - << "[HW_ASCEND_NPU] The size of in_shape is invalid: " << in_shape.size(); + << "[HWAscendNPU] The size of in_shape is invalid: " << in_shape.size(); // Padding the shape to 4-dimensions(NCHW) std::vector out_shape(4, 1); std::copy(in_shape.begin(), @@ -152,7 +152,7 @@ int CvtActMode(const std::string& act_type) { act_mode = 9; } else { // TODO(yanghongtian): support more activation mode - LOG(FATAL) << "[NPU] Unsupported activation type " << act_type; + LOG(FATAL) << "[HWAscendNPU] Unsupported activation type " << act_type; } return act_mode; } diff --git a/lite/kernels/hw_ascend_npu/subgraph_compute.cc b/lite/kernels/hw_ascend_npu/subgraph_compute.cc index b0ae774d70..b7d27f5931 100644 --- a/lite/kernels/hw_ascend_npu/subgraph_compute.cc +++ b/lite/kernels/hw_ascend_npu/subgraph_compute.cc @@ -19,7 +19,7 @@ #include "lite/backends/hw_ascend_npu/device.h" #include "lite/core/op_registry.h" #include "lite/kernels/hw_ascend_npu/bridges/graph.h" -#include "lite/kernels/npu/bridges/paddle_use_bridges.h" +#include "lite/kernels/hw_ascend_npu/bridges/paddle_use_bridges.h" namespace paddle { namespace lite { diff --git a/lite/tests/kernels/CMakeLists.txt b/lite/tests/kernels/CMakeLists.txt index cb454c4da5..c7c84f1d69 100644 --- a/lite/tests/kernels/CMakeLists.txt +++ b/lite/tests/kernels/CMakeLists.txt @@ -1,42 +1,53 @@ -if((NOT LITE_WITH_OPENCL AND NOT LITE_WITH_FPGA AND NOT LITE_WITH_BM AND NOT LITE_WITH_MLU) AND (LITE_WITH_X86 OR LITE_WITH_ARM)) - lite_cc_test(test_kernel_conv_compute SRCS conv_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_conv_transpose_compute SRCS conv_transpose_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_scale_compute SRCS scale_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_power_compute SRCS power_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_shuffle_channel_compute SRCS shuffle_channel_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_yolo_box_compute SRCS yolo_box_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_fc_compute SRCS fc_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_elementwise_compute SRCS elementwise_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_lrn_compute SRCS lrn_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_decode_bboxes_compute SRCS decode_bboxes_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_box_coder_compute SRCS box_coder_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_activation_compute SRCS activation_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_argmax_compute SRCS argmax_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_axpy_compute SRCS axpy_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_norm_compute SRCS norm_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_cast_compute SRCS cast_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_instance_norm_compute SRCS instance_norm_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_grid_sampler_compute SRCS grid_sampler_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) + +set (kernels + ${xpu_kernels} + ${npu_kernels} + ${x86_kernels} + ${cuda_kernels} + ${arm_kernels} + ${lite_ops} + ${host_kernels} + ${hw_ascend_npu_kernels}) + +if((NOT LITE_WITH_OPENCL AND NOT LITE_WITH_FPGA AND NOT LITE_WITH_BM AND NOT LITE_WITH_MLU AND NOT LITE_WITH_HW_ASCEND_NPU) AND (LITE_WITH_X86 OR LITE_WITH_ARM)) + lite_cc_test(test_kernel_conv_compute SRCS conv_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_conv_transpose_compute SRCS conv_transpose_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_scale_compute SRCS scale_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_power_compute SRCS power_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_shuffle_channel_compute SRCS shuffle_channel_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_yolo_box_compute SRCS yolo_box_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_fc_compute SRCS fc_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_elementwise_compute SRCS elementwise_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_lrn_compute SRCS lrn_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_decode_bboxes_compute SRCS decode_bboxes_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_box_coder_compute SRCS box_coder_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_activation_compute SRCS activation_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_argmax_compute SRCS argmax_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_axpy_compute SRCS axpy_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_norm_compute SRCS norm_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_cast_compute SRCS cast_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_instance_norm_compute SRCS instance_norm_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_grid_sampler_compute SRCS grid_sampler_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) #lite_cc_test(test_kernel_sequence_softmax_compute SRCS sequence_softmax_compute_test.cc DEPS arena_framework ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) #lite_cc_test(test_kernel_im2sequence_compute SRCS im2sequence_compute_test.cc DEPS arena_framework ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_compare_compute SRCS compare_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) + lite_cc_test(test_kernel_compare_compute SRCS compare_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) #lite_cc_test(test_kernel_logical_xor_compute SRCS logical_compute_test.cc DEPS arena_framework ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_topk_compute SRCS topk_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_increment_compute SRCS increment_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_write_to_array_compute SRCS write_to_array_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_read_from_array_compute SRCS read_from_array_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_concat_compute SRCS concat_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_transpose_compute SRCS transpose_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_reshape_compute SRCS reshape_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_layer_norm_compute SRCS layer_norm_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_dropout_compute SRCS dropout_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_softmax_compute SRCS softmax_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_mul_compute SRCS mul_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_multiclass_nms_compute SRCS multiclass_nms_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_batch_norm_compute SRCS batch_norm_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_pool_compute SRCS pool_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_fill_constant_compute SRCS fill_constant_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_fill_constant_batch_size_like_compute SRCS fill_constant_batch_size_like_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) + lite_cc_test(test_kernel_topk_compute SRCS topk_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_increment_compute SRCS increment_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_write_to_array_compute SRCS write_to_array_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_read_from_array_compute SRCS read_from_array_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_concat_compute SRCS concat_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_transpose_compute SRCS transpose_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_reshape_compute SRCS reshape_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_layer_norm_compute SRCS layer_norm_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_dropout_compute SRCS dropout_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_softmax_compute SRCS softmax_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_mul_compute SRCS mul_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_multiclass_nms_compute SRCS multiclass_nms_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_batch_norm_compute SRCS batch_norm_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_pool_compute SRCS pool_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_fill_constant_compute SRCS fill_constant_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_fill_constant_batch_size_like_compute SRCS fill_constant_batch_size_like_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) if(LITE_BUILD_EXTRA) lite_cc_test(test_gru_unit SRCS gru_unit_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${bm_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) @@ -73,16 +84,16 @@ if(LITE_BUILD_EXTRA) endif() endif() - lite_cc_test(test_kernel_pad2d_compute SRCS pad2d_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_prior_box_compute SRCS prior_box_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_negative_compute SRCS negative_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_interp_compute SRCS interp_compute_test.cc DEPS arena_framework ${xpu_kernels} ${bm_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_shape_compute SRCS shape_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_crop_compute SRCS crop_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${bm_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_sequence_expand_compute SRCS sequence_expand_compute_test.cc DEPS arena_framework ${xpu_kernels} ${bm_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_squeeze_compute SRCS squeeze_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_slice_compute SRCS slice_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_expand_compute SRCS expand_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) - lite_cc_test(test_kernel_matmul_compute SRCS matmul_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) + lite_cc_test(test_kernel_pad2d_compute SRCS pad2d_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_prior_box_compute SRCS prior_box_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_negative_compute SRCS negative_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_interp_compute SRCS interp_compute_test.cc DEPS arena_framework ${xpu_kernels} ${bm_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_shape_compute SRCS shape_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_crop_compute SRCS crop_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${x86_kernels} ${bm_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_sequence_expand_compute SRCS sequence_expand_compute_test.cc DEPS arena_framework ${xpu_kernels} ${bm_kernels} ${npu_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_squeeze_compute SRCS squeeze_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_slice_compute SRCS slice_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_expand_compute SRCS expand_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) + lite_cc_test(test_kernel_matmul_compute SRCS matmul_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels} ${hw_ascend_npu_kernels}) #lite_cc_test(test_kernel_crf_decoding_compute SRCS crf_decoding_compute_test.cc DEPS arena_framework ${xpu_kernels} ${npu_kernels} ${bm_kernels} ${x86_kernels} ${cuda_kernels} ${arm_kernels} ${lite_ops} ${host_kernels}) endif() -- GitLab