CMakeLists.txt 11.9 KB
Newer Older
L
liuruilong 已提交
1 2
set(dir ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${dir}/build")
3
set(FOUND_MATCH OFF)
L
liuruilong 已提交
4

5 6 7 8 9 10
set(CON -1)

message(STATUS "nets :${NET}")

list(FIND NET "googlenet" CON)
if (CON GREATER -1)
11
    # gen test
12
    ADD_EXECUTABLE(test-googlenet net/test_googlenet.cpp test_helper.h test_include.h executor_for_test.h)
13
    target_link_libraries(test-googlenet paddle-mobile)
14 15 16 17 18 19 20

    set(FOUND_MATCH ON)

endif ()

list(FIND NET "mobilenet" CON)
if (CON GREATER -1)
21
    # gen test
22
    ADD_EXECUTABLE(test-mobilenet net/test_mobilenet.cpp test_helper.h test_include.h executor_for_test.h)
23
    target_link_libraries(test-mobilenet paddle-mobile)
24 25

    # gen test
26
    ADD_EXECUTABLE(test-mobilenet-combine net/test_mobilenet_combine.cpp test_helper.h test_include.h executor_for_test.h)
27
    target_link_libraries(test-mobilenet-combine paddle-mobile)
28 29 30
    set(FOUND_MATCH ON)

endif ()
31

32 33
list(FIND NET "yolo" CON)
if (CON GREATER -1)
34
    # gen test
35
    ADD_EXECUTABLE(test-yolo net/test_yolo.cpp test_helper.h test_include.h executor_for_test.h)
36
    target_link_libraries(test-yolo paddle-mobile)
xiebaiyuan's avatar
xiebaiyuan 已提交
37
    # gen test
38 39
    ADD_EXECUTABLE(test-yolo-combined net/test_yolo_combined.cpp test_helper.h test_include.h executor_for_test.h)
    target_link_libraries(test-yolo-combined paddle-mobile)
40 41 42 43 44 45
    set(FOUND_MATCH ON)

endif ()

list(FIND NET "squeezenet" CON)
if (CON GREATER -1)
46
    # gen test
47
    ADD_EXECUTABLE(test-squeezenet net/test_squeezenet.cpp test_helper.h test_include.h executor_for_test.h)
48
    target_link_libraries(test-squeezenet paddle-mobile)
49 50 51 52 53 54
    set(FOUND_MATCH ON)

endif ()

list(FIND NET "resnet" CON)
if (CON GREATER -1)
55
    # gen test
56
    ADD_EXECUTABLE(test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h)
57
    target_link_libraries(test-resnet paddle-mobile)
58 59 60 61 62 63 64
    set(FOUND_MATCH ON)

endif ()

list(FIND NET "FPGAnets" CON)
if (CON GREATER -1)
    ADD_EXECUTABLE(test-resnet50 fpga/test_resnet50.cpp test_helper.h test_include.h executor_for_test.h)
Z
zhangyang 已提交
65 66
    target_link_libraries(test-resnet50 paddle-mobile)

Z
zhangyang 已提交
67 68
#    ADD_EXECUTABLE(test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h)
#    target_link_libraries(test-resnet paddle-mobile)
69 70 71 72 73 74
    set(FOUND_MATCH ON)

endif ()

list(FIND NET "mobilenetssd" CON)
if (CON GREATER -1)
75
    # gen test
76
    ADD_EXECUTABLE(test-mobilenetssd net/test_mobilenet+ssd.cpp test_helper.h test_include.h executor_for_test.h)
77
    target_link_libraries(test-mobilenetssd paddle-mobile)
78

79 80 81 82 83 84
    set(FOUND_MATCH ON)

endif ()

list(FIND NET "nlp" CON)
if (CON GREATER -1)
85
    # gen test
86
    ADD_EXECUTABLE(test-nlp net/test_nlp.cpp test_helper.h test_include.h executor_for_test.h)
87 88 89
    target_link_libraries(test-nlp paddle-mobile)

    # gen test
90
    ADD_EXECUTABLE(test-gru-op operators/test_gru_op.cpp test_helper.h test_include.h)
91
    target_link_libraries(test-gru-op paddle-mobile)
92 93 94 95 96 97
    set(FOUND_MATCH ON)

endif ()

list(FIND NET "mobilenetfssd" CON)
if (CON GREATER -1)
xiebaiyuan's avatar
xiebaiyuan 已提交
98
    # gen test
99
    ADD_EXECUTABLE(test-fssd net/test_mobilenet_025_fssd.cpp test_helper.h test_include.h)
xiebaiyuan's avatar
xiebaiyuan 已提交
100
    target_link_libraries(test-fssd paddle-mobile)
xiebaiyuan's avatar
xiebaiyuan 已提交
101

102 103 104 105 106 107
    set(FOUND_MATCH ON)

endif ()

list(FIND NET "genet" CON)
if (CON GREATER -1)
xiebaiyuan's avatar
xiebaiyuan 已提交
108
    # gen test
109
    ADD_EXECUTABLE(test-genet net/test_genet_combine.cpp test_helper.h test_include.h executor_for_test.h)
xiebaiyuan's avatar
xiebaiyuan 已提交
110
    target_link_libraries(test-genet paddle-mobile)
111 112 113
    set(FOUND_MATCH ON)

endif ()
L
liuruilong 已提交
114

115
if (NOT FOUND_MATCH)
L
liuruilong 已提交
116
    # gen test
117
    ADD_EXECUTABLE(test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h)
L
liuruilong 已提交
118 119 120
    target_link_libraries(test-resnet paddle-mobile)

    # gen test
121
    ADD_EXECUTABLE(test-squeezenet net/test_squeezenet.cpp test_helper.h test_include.h executor_for_test.h)
L
liuruilong 已提交
122 123 124
    target_link_libraries(test-squeezenet paddle-mobile)

    # gen test
125
    ADD_EXECUTABLE(test-yolo net/test_yolo.cpp test_helper.h test_include.h executor_for_test.h)
L
liuruilong 已提交
126 127
    target_link_libraries(test-yolo paddle-mobile)

xiebaiyuan's avatar
xiebaiyuan 已提交
128
    # gen test
129
    ADD_EXECUTABLE(test_yolo_combined net/test_yolo_combined.cpp test_helper.h test_include.h executor_for_test.h)
xiebaiyuan's avatar
xiebaiyuan 已提交
130 131
    target_link_libraries(test_yolo_combined paddle-mobile)

L
liuruilong 已提交
132
    # gen test
133
    ADD_EXECUTABLE(test-googlenet net/test_googlenet.cpp test_helper.h test_include.h executor_for_test.h)
L
liuruilong 已提交
134 135
    target_link_libraries(test-googlenet paddle-mobile)

136
    # gen test
137
    ADD_EXECUTABLE(test-conv-op operators/test_cov_op.cpp test_helper.h test_include.h executor_for_test.h)
138 139 140
    target_link_libraries(test-conv-op paddle-mobile)

    # gen test
141
    ADD_EXECUTABLE(test-mul-op operators/test_mul_op.cpp test_helper.h test_include.h)
142 143 144
    target_link_libraries(test-mul-op paddle-mobile)

    # gen test
145
    ADD_EXECUTABLE(test-elementwiseadd-op operators/test_elementwise_add_op.cpp test_helper.h test_include.h)
146 147 148
    target_link_libraries(test-elementwiseadd-op paddle-mobile)

    # gen test
149 150 151 152 153 154 155 156
    ADD_EXECUTABLE(test-elementwisesub-op operators/test_elementwise_sub_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-elementwisesub-op paddle-mobile)

    # gen test
    ADD_EXECUTABLE(test-im2sequence-op operators/test_im2sequence_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-im2sequence-op paddle-mobile)

	# gen test
157
    ADD_EXECUTABLE(test-concat-op operators/test_concat_op.cpp test_helper.h test_include.h)
158 159 160
    target_link_libraries(test-concat-op paddle-mobile)

    # gen test
161
    ADD_EXECUTABLE(test-lrn-op operators/test_lrn_op.cpp test_helper.h test_include.h)
162 163 164
    target_link_libraries(test-lrn-op paddle-mobile)

    # gen test
165
    ADD_EXECUTABLE(test-batchnorm-op operators/test_batchnorm_op.cpp test_helper.h test_include.h)
166 167 168
    target_link_libraries(test-batchnorm-op paddle-mobile)

    # gen test
169
    ADD_EXECUTABLE(test-priorbox-op operators/test_prior_box_op.cpp test_helper.h test_include.h)
170 171 172
    target_link_libraries(test-priorbox-op paddle-mobile)

    # gen test
173
    ADD_EXECUTABLE(test-boxcoder-op operators/test_box_coder_op.cpp test_helper.h test_include.h)
174 175 176
    target_link_libraries(test-boxcoder-op paddle-mobile)

    # gen test
177
    ADD_EXECUTABLE(test-transpose-op operators/test_transpose_op.cpp test_helper.h test_include.h)
178 179 180
    target_link_libraries(test-transpose-op paddle-mobile)

    # gen test
181
    ADD_EXECUTABLE(test-multiclassnms-op operators/test_multiclass_nms_op.cpp test_helper.h test_include.h)
182 183 184
    target_link_libraries(test-multiclassnms-op paddle-mobile)

    # gen test
185
    ADD_EXECUTABLE(test-reshape-op operators/test_reshape_op.cpp test_helper.h test_include.h)
186 187 188
    target_link_libraries(test-reshape-op paddle-mobile)

    # gen test
189
    ADD_EXECUTABLE(test-relu-op operators/test_relu_op.cpp test_helper.h test_include.h)
190 191 192
    target_link_libraries(test-relu-op paddle-mobile)

    # gen test
193
    ADD_EXECUTABLE(test-fc-op operators/test_fusion_fc_op.cpp test_helper.h test_include.h)
194 195
    target_link_libraries(test-fc-op paddle-mobile)

E
debug  
eclipsess 已提交
196 197 198 199
    # gen test
    ADD_EXECUTABLE(test-sum-op operators/test_sum_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-sum-op paddle-mobile)

H
hjchen2 已提交
200 201 202 203 204 205 206 207
    # test quantize op
    ADD_EXECUTABLE(test-quantize-op operators/test_quantize_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-quantize-op paddle-mobile)

    # test dequantize op
    ADD_EXECUTABLE(test-dequantize-op operators/test_dequantize_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-dequantize-op paddle-mobile)

H
hjchen2 已提交
208 209 210 211
    # test int8 conv op
    ADD_EXECUTABLE(test-int8-conv-op operators/test_int8_conv_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-int8-conv-op paddle-mobile)

212 213 214 215 216 217 218 219
    # gen test log
    ADD_EXECUTABLE(test-log common/test_log.cpp)
    target_link_libraries(test-log paddle-mobile)

    # gen test log
    ADD_EXECUTABLE(test-load framework/test_load.cpp)
    target_link_libraries(test-load paddle-mobile)

220 221 222 223
    # gen test log
    ADD_EXECUTABLE(test-loadmemory framework/test_load_memory.cpp)
    target_link_libraries(test-loadmemory paddle-mobile)

N
nhzlx 已提交
224 225 226 227
    ADD_EXECUTABLE(test-inference-api framework/test_inference_api.cpp)
    target_link_libraries(test-inference-api paddle-mobile)


228 229 230 231 232 233 234 235 236 237 238 239 240 241 242
    # gen test log
    # gen test
    ADD_EXECUTABLE(test-optimize framework/test_optimize.cpp)
    target_link_libraries(test-optimize paddle-mobile)


    #gen test
    ADD_EXECUTABLE(test-pool operators/test_pool_op.cpp test_helper.h test_include.h executor_for_test.h)
    target_link_libraries(test-pool paddle-mobile)

    #gen test
    ADD_EXECUTABLE(test-softmax operators/test_softmax_op.cpp test_helper.h test_include.h executor_for_test.h)
    target_link_libraries(test-softmax paddle-mobile)

    # gen test
243 244 245
    ADD_EXECUTABLE(test-gemm-accuracy common/test_gemm_accuracy.cpp)
    target_link_libraries(test-gemm-accuracy paddle-mobile)

246 247 248 249
    # gen test
    ADD_EXECUTABLE(test-gemm-int8-accuracy common/test_gemm_int8_accuracy.cpp)
    target_link_libraries(test-gemm-int8-accuracy paddle-mobile)

250 251 252
    # gen test
    ADD_EXECUTABLE(test-gemm-perf common/test_gemm_perf.cpp)
    target_link_libraries(test-gemm-perf paddle-mobile)
W
wangliu 已提交
253

254 255 256
    # gen test
    ADD_EXECUTABLE(test-enforce common/test_enforce.cpp)
    target_link_libraries(test-enforce paddle-mobile)
L
liuruilong 已提交
257

D
dolphin8 已提交
258
    # gen test - test if openmp works
L
liuruilong 已提交
259
    ADD_EXECUTABLE(test-openmp common/test_openmp.cpp test_helper.h test_include.h executor_for_test.h)
D
dolphin8 已提交
260
    target_link_libraries(test-openmp paddle-mobile)
L
liuruilong 已提交
261

262
    # gen test
263
    ADD_EXECUTABLE(test-mobilenetssd net/test_mobilenet+ssd.cpp test_helper.h test_include.h executor_for_test.h)
264
    target_link_libraries(test-mobilenetssd paddle-mobile)
E
eclipsess 已提交
265

266 267
    # gen test
    ADD_EXECUTABLE(test-mobilenet-combine net/test_mobilenet_combine.cpp test_helper.h test_include.h executor_for_test.h)
268 269
    target_link_libraries(test-mobilenet-combine paddle-mobile)

270
    # gen test
271
    ADD_EXECUTABLE(test-genet net/test_genet_combine.cpp test_helper.h test_include.h executor_for_test.h)
272 273
    target_link_libraries(test-genet paddle-mobile)

274
    # gen test
275
    ADD_EXECUTABLE(test-sigmoid operators/test_sigmoid_op.cpp test_include.h)
276
    target_link_libraries(test-sigmoid paddle-mobile)
W
wangliu 已提交
277

278 279 280
    # gen test
    ADD_EXECUTABLE(test-depthwise-conv-op operators/test_depthwise_conv_op.cpp test_helper.h test_include.h executor_for_test.h)
    target_link_libraries(test-depthwise-conv-op paddle-mobile)
E
eclipsess 已提交
281

L
liuruilong 已提交
282
    # gen test
283
    ADD_EXECUTABLE(test-mobilenet net/test_mobilenet.cpp test_helper.h test_include.h executor_for_test.h)
L
liuruilong 已提交
284 285
    target_link_libraries(test-mobilenet paddle-mobile)

L
liuruilong 已提交
286
    # gen test
287
    ADD_EXECUTABLE(test-conv-add-relu-op operators/test_conv_add_relu_op.cpp test_helper.h test_include.h executor_for_test.h)
L
liuruilong 已提交
288 289
    target_link_libraries(test-conv-add-relu-op paddle-mobile)

290
    # gen test
291
    ADD_EXECUTABLE(test-conv-add-bn-relu-op operators/test_fusion_conv_add_bn_relu_op.cpp test_helper.h test_include.h executor_for_test.h)
292 293
    target_link_libraries(test-conv-add-bn-relu-op paddle-mobile)

xiebaiyuan's avatar
xiebaiyuan 已提交
294
    # gen test
295
    ADD_EXECUTABLE(test-nlp net/test_nlp.cpp test_helper.h test_include.h executor_for_test.h)
xiebaiyuan's avatar
xiebaiyuan 已提交
296 297 298
    target_link_libraries(test-nlp paddle-mobile)

    # gen test
299
    ADD_EXECUTABLE(test-gru-op operators/test_gru_op.cpp test_helper.h test_include.h)
xiebaiyuan's avatar
xiebaiyuan 已提交
300 301
    target_link_libraries(test-gru-op paddle-mobile)

Y
yangfei 已提交
302
    # gen test
Y
yangfei 已提交
303

304
    ADD_EXECUTABLE(test-inceptionv4 net/test_inceptionv4.cpp test_helper.h test_include.h executor_for_test.h)
Y
yangfei 已提交
305 306 307
    target_link_libraries(test-inceptionv4 paddle-mobile)

    # gen test
308
    ADD_EXECUTABLE(test-alexnet net/test_alexnet.cpp test_helper.h test_include.h executor_for_test.h)
Y
yangfei 已提交
309 310
    target_link_libraries(test-alexnet paddle-mobile)

311
    ADD_EXECUTABLE(test-googlenetv1 net/test_googlenetv1_combine.cpp test_helper.h test_include.h)
312 313 314
    target_link_libraries(test-googlenetv1 paddle-mobile)

    # gen test
315
    ADD_EXECUTABLE(test-fssd net/test_mobilenet_025_fssd.cpp test_helper.h test_include.h)
316 317
    target_link_libraries(test-fssd paddle-mobile)

Y
yangfei 已提交
318

319 320 321 322 323
    # gen test
    ADD_EXECUTABLE(test-multi-process net/test_multi_inference_predict.cpp test_helper.h test_include.h)
    target_link_libraries(test-multi-process paddle-mobile)


L
liuruilong 已提交
324
    #add_library(test-lib-size SHARED common/test_lib_size.h common/test_lib_size.cpp)
325
endif ()