CMakeLists.txt 10.5 KB
Newer Older
1
set(op_DEPS tensor op op_params scope memory)
Y
Yan Chunwei 已提交
2 3 4

lite_cc_library(op_params SRCS op_params.cc DEPS tensor any)

5
# 1.baisc ops used in basic models
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
add_operator(conv_op basic SRCS conv_op.cc DEPS ${op_DEPS})
add_operator(pool_op basic SRCS pool_op.cc DEPS ${op_DEPS})
add_operator(fc_op basic SRCS fc_op.cc DEPS ${op_DEPS})
add_operator(mul_op basic SRCS mul_op.cc DEPS ${op_DEPS})
add_operator(matmul_op basic SRCS matmul_op.cc DEPS ${op_DEPS})
add_operator(scale_op basic SRCS scale_op.cc DEPS ${op_DEPS})
add_operator(softmax_op basic SRCS softmax_op.cc DEPS ${op_DEPS})
add_operator(reshape_op basic SRCS reshape_op.cc DEPS ${op_DEPS} )
add_operator(batch_norm_op basic SRCS batch_norm_op.cc DEPS ${op_DEPS})
add_operator(feed_op basic SRCS feed_op.cc DEPS ${op_DEPS})
add_operator(fetch_op basic SRCS fetch_op.cc DEPS ${op_DEPS})
add_operator(activation_ops basic SRCS activation_ops.cc DEPS ${op_DEPS})
add_operator(elementwise_ops basic SRCS elementwise_ops.cc DEPS ${op_DEPS})
add_operator(box_coder_op_lite basic SRCS box_coder_op.cc DEPS ${op_DEPS})
add_operator(multiclass_nms_op_lite basic SRCS multiclass_nms_op.cc DEPS ${op_DEPS})
add_operator(mean_op basic SRCS mean_op.cc DEPS ${op_DEPS})
add_operator(fill_constant_op basic SRCS fill_constant_op.cc DEPS ${op_DEPS})
add_operator(shuffle_channel_op basic SRCS shuffle_channel_op.cc DEPS ${op_DEPS})
add_operator(yolo_box_op basic SRCS yolo_box_op.cc DEPS ${op_DEPS})
add_operator(interpolate_op basic SRCS interpolate_op.cc DEPS ${op_DEPS})
add_operator(argmax_op basic SRCS argmax_op.cc DEPS ${op_DEPS})
add_operator(prior_box_op basic SRCS prior_box_op.cc DEPS ${op_DEPS})
add_operator(concat_op basic SRCS concat_op.cc DEPS ${op_DEPS})
add_operator(pad2d_op basic SRCS pad2d_op.cc DEPS ${op_DEPS})
add_operator(calib_op basic SRCS calib_op.cc DEPS ${op_DEPS})
add_operator(split_op basic SRCS split_op.cc DEPS ${op_DEPS})
add_operator(transpose_op basic SRCS transpose_op.cc DEPS ${op_DEPS})
add_operator(fake_quant basic SRCS fake_quantize_moving_avg_max_abs.cc DEPS ${op_DEPS})
add_operator(fake_dequant basic SRCS fake_dequantize_max_abs.cc DEPS ${op_DEPS})
add_operator(conv_transpose_op basic SRCS conv_transpose_op.cc DEPS ${op_DEPS})
add_operator(expand_op_lite basic SRCS expand_op.cc DEPS ${op_DEPS})
add_operator(squeeze_op_lite basic SRCS squeeze_op.cc DEPS ${op_DEPS})
38 39 40 41 42 43 44 45 46 47 48 49
add_operator(unsqueeze_op_lite basic SRCS unsqueeze_op.cc DEPS ${op_DEPS})
add_operator(stack_op basic SRCS stack_op.cc DEPS ${op_DEPS})
add_operator(cast_op_lite basic SRCS cast_op.cc DEPS ${op_DEPS})
add_operator(affine_channel_op basic SRCS affine_channel_op.cc DEPS ${op_DEPS})
add_operator(range_op basic SRCS range_op.cc DEPS ${op_DEPS})
add_operator(reduce_mean_op basic SRCS reduce_mean_op.cc DEPS ${op_DEPS})
add_operator(relu_op basic SRCS relu_op.cc DEPS ${op_DEPS})
add_operator(io_copy_op basic SRCS io_copy_op.cc DEPS ${op_DEPS})
add_operator(fusion_elementwise_activation_ops basic SRCS fusion_elementwise_activation_ops.cc DEPS elementwise_ops ${op_DEPS})
add_operator(io_copy_once_op basic SRCS io_copy_once_op.cc DEPS io_copy_op ${op_DEPS})
add_operator(dropout_op basic SRCS dropout_op.cc DEPS ${op_DEPS})
add_operator(layout_op basic SRCS layout_op.cc DEPS ${op_DEPS})
50
add_operator(instance_norm_op basic SRCS instance_norm_op.cc DEPS ${op_DEPS})
51
add_operator(subgraph_op basic SRCS subgraph_op.cc DEPS ${op_DEPS})
52
add_operator(grid_sampler_op basic SRCS grid_sampler_op.cc DEPS ${op_DEPS})
53
add_operator(flatten_op basic SRCS flatten_op.cc DEPS ${op_DEPS})
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76

# 2.basic ops not used in basic models
add_operator(negative_op extra SRCS negative_op.cc DEPS ${op_DEPS})
add_operator(crop_op extra SRCS crop_op.cc DEPS ${op_DEPS})
add_operator(assign_op extra SRCS assign_op.cc DEPS ${op_DEPS})
add_operator(power_op extra SRCS power_op.cc DEPS ${op_DEPS})
add_operator(norm_op extra SRCS norm_op.cc DEPS ${op_DEPS})

# 3.extra ops
add_operator(search_group_padding extra SRCS search_group_padding_op.cc DEPS ${op_DEPS})
add_operator(lrn_op_lite extra SRCS lrn_op.cc DEPS ${op_DEPS})
add_operator(decode_bboxes_op_lite extra SRCS decode_bboxes_op.cc DEPS ${op_DEPS})
add_operator(uniform_random_op extra SRCS uniform_random_op.cc DEPS ${op_DEPS})
add_operator(axpy_op extra SRCS axpy_op.cc DEPS ${op_DEPS})
add_operator(gru_unit_op extra SRCS gru_unit_op.cc DEPS ${op_DEPS})
add_operator(gru_op extra SRCS gru_op.cc DEPS ${op_DEPS})
add_operator(layout_once_op extra SRCS layout_once_op.cc DEPS ${op_DEPS})
add_operator(density_prior_box_op extra SRCS density_prior_box_op.cc DEPS ${op_DEPS})
add_operator(calib_once_op extra SRCS calib_once_op.cc DEPS ${op_DEPS})
add_operator(reduce_max_op_lite extra SRCS reduce_max_op.cc DEPS ${op_DEPS})
add_operator(shape_op_lite extra SRCS shape_op.cc DEPS ${op_DEPS})
add_operator(sequence_expand_op_lite extra SRCS sequence_expand_op.cc DEPS ${op_DEPS})
add_operator(im2sequence_op extra SRCS im2sequence_op.cc DEPS ${op_DEPS})
H
huzhiqiang 已提交
77 78 79 80 81 82 83 84 85
add_operator(gather_op extra SRCS gather_op.cc DEPS ${op_DEPS})
add_operator(anchor_generator_op extra SRCS anchor_generator_op.cc DEPS ${op_DEPS})
add_operator(generate_proposals_op extra SRCS generate_proposals_op.cc DEPS ${op_DEPS})
add_operator(roi_align_op extra SRCS roi_align_op.cc DEPS ${op_DEPS})
add_operator(box_clip_op extra SRCS box_clip_op.cc DEPS ${op_DEPS})
add_operator(fake_quantize_range_abs_max_op extra SRCS fake_quantize_range_abs_max.cc DEPS ${op_DEPS})
add_operator(sequence_expand_as_op_lite extra SRCS sequence_expand_as_op.cc DEPS ${op_DEPS})
add_operator(assign_value_op extra SRCS assign_value_op.cc DEPS ${op_DEPS})
add_operator(fake_quantize_dequantize_moving_avg_abs_max_op extra SRCS fake_quantize_dequantize_moving_avg_max_abs.cc DEPS ${op_DEPS})
86
add_operator(fake_channel_wise_dequantize_max_abs_op extra SRCS fake_channel_wise_dequantize_max_abs.cc DEPS ${op_DEPS})
J
juncaipeng 已提交
87 88 89
add_operator(split_lod_tensor_op_lite extra SRCS split_lod_tensor_op.cc DEPS ${op_DEPS})
add_operator(merge_lod_tensor_op_lite extra SRCS merge_lod_tensor_op.cc DEPS ${op_DEPS})
add_operator(reduce_prod_op_lite extra SRCS reduce_prod_op.cc DEPS ${op_DEPS})
90
add_operator(sequence_reshape_op_lite extra SRCS sequence_reshape_op.cc DEPS ${op_DEPS})
91
add_operator(sequence_reverse_op_lite extra SRCS sequence_reverse_op.cc DEPS ${op_DEPS})
92 93
add_operator(sequence_pool extra SRCS sequence_pool_op.cc DEPS ${op_DEPS})
add_operator(sequence_pool_concat extra SRCS sequence_pool_concat_op.cc DEPS ${op_DEPS})
94
add_operator(reduce_sum_op_lite extra SRCS reduce_ops.cc DEPS ${op_DEPS})
J
juncaipeng 已提交
95 96 97
add_operator(match_matrix_tensor_op_lite extra SRCS match_matrix_tensor_op.cc DEPS ${op_DEPS})
add_operator(search_seq_depadding_op_lite extra SRCS search_seq_depadding_op.cc DEPS ${op_DEPS})
add_operator(search_grnn_op_lite extra SRCS search_grnn_op.cc DEPS ${op_DEPS})
98
add_operator(search_seq_softmax_op_lite extra SRCS search_seq_softmax_op.cc DEPS ${op_DEPS})
99
add_operator(sequence_concat_op_lite extra SRCS sequence_concat_op.cc DEPS ${op_DEPS})
100
add_operator(var_conv_2d_op_lite extra SRCS var_conv_2d_op.cc DEPS ${op_DEPS})
101
add_operator(attention_padding_mask_op_lite extra SRCS attention_padding_mask_op.cc DEPS ${op_DEPS})
102
add_operator(sequence_arithmetic_op_lite extra SRCS sequence_arithmetic_op.cc DEPS ${op_DEPS})
J
juncaipeng 已提交
103 104
add_operator(conditional_block_op_lite extra SRCS conditional_block_op.cc DEPS ${op_DEPS})
add_operator(collect_fpn_proposals_op_lite extra SRCS collect_fpn_proposals_op.cc DEPS ${op_DEPS})
J
juncaipeng 已提交
105
add_operator(distribute_fpn_proposals_op_lite extra SRCS distribute_fpn_proposals_op.cc DEPS ${op_DEPS})
106 107 108 109

# for OCR specific
add_operator(while_op extra SRCS while_op.cc DEPS ${op_DEPS})
add_operator(lookup_table_op extra SRCS lookup_table_op.cc DEPS ${op_DEPS})
110
add_operator(lookup_table_v2_op extra SRCS lookup_table_v2_op.cc DEPS ${op_DEPS})
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
add_operator(beam_search_decode_op extra SRCS beam_search_decode_op.cc DEPS ${op_DEPS})
add_operator(logical_xor  extra SRCS logical_op.cc DEPS ${op_DEPS})
add_operator(logical_and  extra SRCS logical_op.cc DEPS ${op_DEPS})
add_operator(logical_or  extra SRCS logical_op.cc DEPS ${op_DEPS})
add_operator(logical_not  extra SRCS logical_op.cc DEPS ${op_DEPS})
add_operator(less_than  extra SRCS compare_op.cc DEPS ${op_DEPS})
add_operator(equal  extra SRCS compare_op.cc DEPS ${op_DEPS})
add_operator(not_equal  extra SRCS compare_op.cc DEPS ${op_DEPS})
add_operator(less_equal  extra SRCS compare_op.cc DEPS ${op_DEPS})
add_operator(greater_than  extra SRCS compare_op.cc DEPS ${op_DEPS})
add_operator(greater_equal  extra SRCS compare_op.cc DEPS ${op_DEPS})
add_operator(read_from_array_op extra SRCS read_from_array_op.cc DEPS ${op_DEPS})
add_operator(beam_search_op extra SRCS beam_search_op.cc DEPS ${op_DEPS})
add_operator(lod_reset_op extra SRCS lod_reset_op.cc DEPS ${op_DEPS})
add_operator(is_empty extra SRCS is_empty_op.cc DEPS ${op_DEPS})
Z
Zhaolong Xing 已提交
126
add_operator(slice_op_lite basic SRCS slice_op.cc DEPS ${op_DEPS})
127 128 129
add_operator(write_to_array_op extra SRCS write_to_array_op.cc DEPS ${op_DEPS})
add_operator(topk_op extra SRCS topk_op.cc DEPS ${op_DEPS})
add_operator(increment_op extra SRCS increment_op.cc DEPS ${op_DEPS})
130
add_operator(layer_norm_op extra SRCS layer_norm_op.cc DEPS ${op_DEPS})
131
add_operator(sequence_softmax_op extra SRCS sequence_softmax_op.cc DEPS ${op_DEPS})
132 133 134
# for content-dnn specific
add_operator(search_aligned_mat_mul_op extra SRCS search_aligned_mat_mul_op.cc DEPS ${op_DEPS})
add_operator(search_seq_fc_op extra SRCS search_seq_fc_op.cc DEPS ${op_DEPS})
135 136
add_operator(sequence_topk_avg_pooling_op basic SRCS sequence_topk_avg_pooling_op.cc DEPS ${op_DEPS})
add_operator(search_fc_op basic SRCS search_fc_op.cc DEPS ${op_DEPS})
Y
Yan Chunwei 已提交
137 138 139 140 141 142 143 144 145 146 147 148 149

if (NOT LITE_WITH_X86)
    lite_cc_test(test_fc_op SRCS fc_op_test.cc
                DEPS fc_op memory
                X86_DEPS fc_compute_x86
                ARM_DEPS fc_compute_arm)
    lite_cc_test(test_pool_op SRCS pool_op_test.cc
                DEPS pool_op memory
                ARM_DEPS pool_compute_arm)
    lite_cc_test(test_scale_op SRCS scale_op_test.cc DEPS scale_op memory)
    lite_cc_test(test_softmax_op SRCS softmax_op_test.cc DEPS softmax_op memory)
    #lite_cc_test(test_reshape_op SRCS reshape_op_test.cc DEPS reshape_op memory)
    lite_cc_test(test_batch_norm_op SRCS batch_norm_op_test.cc DEPS batch_norm_op memory)
150
    lite_cc_test(test_concat_op SRCS concat_op_test.cc DEPS concat_op memory scope)
Y
Yan Chunwei 已提交
151 152
    lite_cc_test(test_calib_op SRCS calib_op_test.cc DEPS calib_op memory ARM_DEPS calib_compute_arm)
    lite_cc_test(test_transpose_op SRCS transpose_op_test.cc DEPS transpose_op memory)
153 154 155
    lite_cc_test(test_fusion_elementwise_activation_ops
                 SRCS fusion_elementwise_activation_ops_test.cc
                 DEPS fusion_elementwise_activation_ops memory)
Y
Yan Chunwei 已提交
156
endif()