CMakeLists.txt 5.0 KB
Newer Older
1
if(NOT LITE_WITH_NPU AND NOT LITE_WITH_XPU AND NOT LITE_WITH_BM)
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 41 42 43
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_square_op_npu SRCS square_op.cc DEPS ${npu_subgraph_bridge_deps})
lite_cc_library(subgraph_bridge_sqrt_op_npu SRCS sqrt_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})
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_layer_norm_op_npu SRCS layer_norm_op.cc DEPS ${npu_subgraph_bridge_deps})
47 48
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})
49 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})

Y
Yan Chunwei 已提交
52

53 54 55 56 57 58
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
59
        subgraph_bridge_matmul_op_npu
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
        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_square_op_npu
        subgraph_bridge_sqrt_op_npu
        subgraph_bridge_reduce_mean_op_npu
        subgraph_bridge_unsqueeze_op_npu
        subgraph_bridge_argmax_op_npu
80
        subgraph_bridge_instance_norm_op_npu
81
        subgraph_bridge_dropout_op_npu
82
        subgraph_bridge_layer_norm_op_npu
83 84
        subgraph_bridge_fill_constant_op_npu
        subgraph_bridge_fill_constant_batch_size_like_op_npu
85 86
        subgraph_bridge_increment_op_npu
        subgraph_bridge_compare_op_npu
87 88 89
        CACHE INTERNAL "npu_subgraph_bridges")

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