CMakeLists.txt 5.3 KB
Newer Older
H
hong19860320 已提交
1
if(NOT LITE_WITH_NPU AND NOT LITE_WITH_XTCL AND NOT LITE_WITH_BM AND NOT LITE_WITH_RKNPU AND NOT LITE_WITH_MLU AND NOT LITE_WITH_APU)
2 3
  return()
endif()
Y
Yan Chunwei 已提交
4

5 6 7 8 9 10
lite_cc_library(subgraph_bridge_registry
    SRCS registry.cc
    DEPS op)
lite_cc_library(subgraph_bridge_engine
    SRCS engine.cc
    DEPS tensor op scope program)
Y
Yan Chunwei 已提交
11

12 13 14
if(NOT LITE_WITH_NPU)
  return()
endif()
Y
Yan Chunwei 已提交
15

16 17
lite_cc_library(subgraph_bridge_utility_npu SRCS utility.cc DEPS ${npu_builder_libs} tensor)
lite_cc_library(subgraph_bridge_graph_npu SRCS graph.cc DEPS subgraph_bridge_utility_npu)
Y
Yan Chunwei 已提交
18

19
set(npu_subgraph_bridge_deps subgraph_bridge_registry subgraph_bridge_utility_npu subgraph_bridge_graph_npu)
Y
Yan Chunwei 已提交
20

21 22
lite_cc_library(subgraph_bridge_fc_op_npu SRCS fc_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_conv_op_npu SRCS conv_op.cc DEPS ${npu_subgraph_bridge_deps})
23
lite_cc_library(subgraph_bridge_matmul_op_npu SRCS matmul_op.cc DEPS ${npu_subgraph_bridge_deps})
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
lite_cc_library(subgraph_bridge_mul_op_npu SRCS mul_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_act_op_npu SRCS act_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_scale_op_npu SRCS scale_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_softmax_op_npu SRCS softmax_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_pool_op_npu SRCS pool_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_batch_norm_op_npu SRCS batch_norm_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_elementwise_ops_npu SRCS elementwise_ops.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_reshape_op_npu SRCS reshape_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_conv_transpose_op_npu SRCS conv_transpose_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_interpolate_op_npu SRCS interpolate_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_transpose_op_npu SRCS transpose_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_split_op_npu SRCS split_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_concat_op_npu SRCS concat_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_shuffle_channel_op_npu SRCS shuffle_channel_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_pad2d_op_npu SRCS pad2d_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_reduce_mean_op_npu SRCS reduce_mean_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_unsqueeze_op_npu SRCS unsqueeze_op.cc DEPS ${npu_subgraph_bridge_deps})
41 42
lite_cc_library(subgraph_bridge_gather_op_npu SRCS gather_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_lookup_table_op_npu SRCS lookup_table_op.cc DEPS ${npu_subgraph_bridge_deps})
43
lite_cc_library(subgraph_bridge_argmax_op_npu SRCS argmax_op.cc DEPS ${npu_subgraph_bridge_deps})
44
lite_cc_library(subgraph_bridge_instance_norm_op_npu SRCS instance_norm_op.cc DEPS ${npu_subgraph_bridge_deps})
45
lite_cc_library(subgraph_bridge_dropout_op_npu SRCS dropout_op.cc DEPS ${npu_subgraph_bridge_deps})
46
lite_cc_library(subgraph_bridge_topk_op_npu SRCS topk_op.cc DEPS ${npu_subgraph_bridge_deps})
47
lite_cc_library(subgraph_bridge_layer_norm_op_npu SRCS layer_norm_op.cc DEPS ${npu_subgraph_bridge_deps})
48 49
lite_cc_library(subgraph_bridge_fill_constant_op_npu SRCS fill_constant_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_fill_constant_batch_size_like_op_npu SRCS fill_constant_batch_size_like_op.cc DEPS ${npu_subgraph_bridge_deps})
50 51
lite_cc_library(subgraph_bridge_increment_op_npu SRCS increment_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_compare_op_npu SRCS compare_op.cc DEPS ${npu_subgraph_bridge_deps})
52
#lite_cc_library(subgraph_bridge_shape_op_npu SRCS shape_op.cc DEPS ${npu_subgraph_bridge_deps})
53

Y
Yan Chunwei 已提交
54

55 56 57 58 59 60
set(npu_subgraph_bridges
        subgraph_bridge_registry
        subgraph_bridge_utility_npu
        subgraph_bridge_graph_npu
        subgraph_bridge_fc_op_npu
        subgraph_bridge_conv_op_npu
61
        subgraph_bridge_matmul_op_npu
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
        subgraph_bridge_mul_op_npu
        subgraph_bridge_act_op_npu
        subgraph_bridge_scale_op_npu
        subgraph_bridge_softmax_op_npu
        subgraph_bridge_pool_op_npu
        subgraph_bridge_batch_norm_op_npu
        subgraph_bridge_elementwise_ops_npu
        subgraph_bridge_reshape_op_npu
        subgraph_bridge_conv_transpose_op_npu
        subgraph_bridge_interpolate_op_npu
        subgraph_bridge_transpose_op_npu
        subgraph_bridge_split_op_npu
        subgraph_bridge_concat_op_npu
        subgraph_bridge_shuffle_channel_op_npu
        subgraph_bridge_pad2d_op_npu
        subgraph_bridge_reduce_mean_op_npu
        subgraph_bridge_unsqueeze_op_npu
79 80
        subgraph_bridge_gather_op_npu
        subgraph_bridge_lookup_table_op_npu
81
        subgraph_bridge_argmax_op_npu
82
        subgraph_bridge_instance_norm_op_npu
83
        subgraph_bridge_dropout_op_npu
84
        subgraph_bridge_topk_op_npu
85
        subgraph_bridge_layer_norm_op_npu
86 87
        subgraph_bridge_fill_constant_op_npu
        subgraph_bridge_fill_constant_batch_size_like_op_npu
88 89
        subgraph_bridge_increment_op_npu
        subgraph_bridge_compare_op_npu
90 91 92
        CACHE INTERNAL "npu_subgraph_bridges")

message(STATUS "+++++ npu_subgraph_bridges: ${npu_subgraph_bridges}")