CMakeLists.txt 13.7 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
    # gen test
    ADD_EXECUTABLE(test-googlenet-quali net/test_googlenet_quali.cpp test_helper.h test_include.h executor_for_test.h)
    target_link_libraries(test-googlenet-quali paddle-mobile)
18 19 20 21 22 23
    set(FOUND_MATCH ON)

endif ()

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

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

endif ()
34

35 36
list(FIND NET "yolo" CON)
if (CON GREATER -1)
37
    # gen test
38
    ADD_EXECUTABLE(test-yolo net/test_yolo.cpp test_helper.h test_include.h executor_for_test.h)
39
    target_link_libraries(test-yolo paddle-mobile)
xiebaiyuan's avatar
xiebaiyuan 已提交
40
    # gen test
41 42
    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)
43 44 45 46 47 48
    set(FOUND_MATCH ON)

endif ()

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

endif ()

list(FIND NET "resnet" CON)
if (CON GREATER -1)
58
    # gen test
59
    ADD_EXECUTABLE(test-resnet net/test_resnet.cpp test_helper.h test_include.h executor_for_test.h)
60
    target_link_libraries(test-resnet paddle-mobile)
61 62 63 64 65 66 67
    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 已提交
68 69
    target_link_libraries(test-resnet50 paddle-mobile)

Z
zhangyang 已提交
70 71
#    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)
72 73 74 75 76 77
    set(FOUND_MATCH ON)

endif ()

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

82 83 84 85 86 87
    set(FOUND_MATCH ON)

endif ()

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

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

endif ()

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

105 106 107 108 109 110
    set(FOUND_MATCH ON)

endif ()

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

endif ()
L
liuruilong 已提交
117

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

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

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

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

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

139 140 141 142
    # gen test
    ADD_EXECUTABLE(test-googlenet-quali net/test_googlenet_quali.cpp test_helper.h test_include.h executor_for_test.h)
    target_link_libraries(test-googlenet-quali paddle-mobile)

143
    # gen test
144
    ADD_EXECUTABLE(test-conv-op operators/test_cov_op.cpp test_helper.h test_include.h executor_for_test.h)
145 146 147
    target_link_libraries(test-conv-op paddle-mobile)

    # gen test
148
    ADD_EXECUTABLE(test-mul-op operators/test_mul_op.cpp test_helper.h test_include.h)
149 150 151
    target_link_libraries(test-mul-op paddle-mobile)

    # gen test
152
    ADD_EXECUTABLE(test-elementwiseadd-op operators/test_elementwise_add_op.cpp test_helper.h test_include.h)
153 154 155
    target_link_libraries(test-elementwiseadd-op paddle-mobile)

    # gen test
156 157 158 159 160 161 162 163
    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
164
    ADD_EXECUTABLE(test-concat-op operators/test_concat_op.cpp test_helper.h test_include.h)
165 166 167
    target_link_libraries(test-concat-op paddle-mobile)

    # gen test
168
    ADD_EXECUTABLE(test-lrn-op operators/test_lrn_op.cpp test_helper.h test_include.h)
169 170 171
    target_link_libraries(test-lrn-op paddle-mobile)

    # gen test
172
    ADD_EXECUTABLE(test-batchnorm-op operators/test_batchnorm_op.cpp test_helper.h test_include.h)
173 174 175
    target_link_libraries(test-batchnorm-op paddle-mobile)

    # gen test
176
    ADD_EXECUTABLE(test-priorbox-op operators/test_prior_box_op.cpp test_helper.h test_include.h)
177 178 179
    target_link_libraries(test-priorbox-op paddle-mobile)

    # gen test
180
    ADD_EXECUTABLE(test-boxcoder-op operators/test_box_coder_op.cpp test_helper.h test_include.h)
181 182 183
    target_link_libraries(test-boxcoder-op paddle-mobile)

    # gen test
184
    ADD_EXECUTABLE(test-transpose-op operators/test_transpose_op.cpp test_helper.h test_include.h)
185 186
    target_link_libraries(test-transpose-op paddle-mobile)

L
lijiancheng0614 已提交
187 188 189 190
    # gen test
    ADD_EXECUTABLE(test-transpose2-op operators/test_transpose2_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-transpose2-op paddle-mobile)

191
    # gen test
192
    ADD_EXECUTABLE(test-multiclassnms-op operators/test_multiclass_nms_op.cpp test_helper.h test_include.h)
193 194
    target_link_libraries(test-multiclassnms-op paddle-mobile)

L
lijiancheng0614 已提交
195 196 197 198
    # gen test
    ADD_EXECUTABLE(test-polygon-box-transform-op operators/test_polygon_box_transform_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-polygon-box-transform-op paddle-mobile)

L
lijiancheng0614 已提交
199 200 201 202
    # gen test
    ADD_EXECUTABLE(test-fill-constant-op operators/test_fill_constant_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-fill-constant-op paddle-mobile)

203
    # gen test
204
    ADD_EXECUTABLE(test-reshape-op operators/test_reshape_op.cpp test_helper.h test_include.h)
205 206
    target_link_libraries(test-reshape-op paddle-mobile)

L
lijiancheng0614 已提交
207 208 209 210
    # gen test
    ADD_EXECUTABLE(test-reshape2-op operators/test_reshape2_op.cpp test_helper.h test_include.h)
    target_link_libraries(test-reshape2-op paddle-mobile)

211
    # gen test
212
    ADD_EXECUTABLE(test-relu-op operators/test_relu_op.cpp test_helper.h test_include.h)
213 214 215
    target_link_libraries(test-relu-op paddle-mobile)

    # gen test
216
    ADD_EXECUTABLE(test-fc-op operators/test_fusion_fc_op.cpp test_helper.h test_include.h)
217 218
    target_link_libraries(test-fc-op paddle-mobile)

E
debug  
eclipsess 已提交
219 220 221 222
    # 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 已提交
223 224 225 226 227 228 229 230
    # 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 已提交
231 232 233 234
    # 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)

235 236 237 238 239 240 241 242
    # 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)

243 244 245 246
    # gen test log
    ADD_EXECUTABLE(test-loadmemory framework/test_load_memory.cpp)
    target_link_libraries(test-loadmemory paddle-mobile)

xiebaiyuan's avatar
xiebaiyuan 已提交
247 248 249 250
    # gen test log
    ADD_EXECUTABLE(test-loadmemory-inference framework/test_load_memory_inference_api.cpp)
    target_link_libraries(test-loadmemory-inference paddle-mobile)

N
nhzlx 已提交
251 252 253 254
    ADD_EXECUTABLE(test-inference-api framework/test_inference_api.cpp)
    target_link_libraries(test-inference-api paddle-mobile)


255 256 257 258 259 260 261 262 263 264 265 266 267 268 269
    # 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
270 271 272
    ADD_EXECUTABLE(test-gemm-accuracy common/test_gemm_accuracy.cpp)
    target_link_libraries(test-gemm-accuracy paddle-mobile)

Z
Zhen Wang 已提交
273 274 275 276
    # gen test
    ADD_EXECUTABLE(test-gemm-int8-accuracy common/test_gemm_int8_accuracy.cpp)
    target_link_libraries(test-gemm-int8-accuracy paddle-mobile)

277 278 279
    # gen test
    ADD_EXECUTABLE(test-gemm-perf common/test_gemm_perf.cpp)
    target_link_libraries(test-gemm-perf paddle-mobile)
W
wangliu 已提交
280

281 282 283
    # gen test
    ADD_EXECUTABLE(test-enforce common/test_enforce.cpp)
    target_link_libraries(test-enforce paddle-mobile)
L
liuruilong 已提交
284

D
dolphin8 已提交
285
    # gen test - test if openmp works
L
liuruilong 已提交
286
    ADD_EXECUTABLE(test-openmp common/test_openmp.cpp test_helper.h test_include.h executor_for_test.h)
D
dolphin8 已提交
287
    target_link_libraries(test-openmp paddle-mobile)
L
liuruilong 已提交
288

289
    # gen test
290
    ADD_EXECUTABLE(test-mobilenetssd net/test_mobilenet+ssd.cpp test_helper.h test_include.h executor_for_test.h)
291
    target_link_libraries(test-mobilenetssd paddle-mobile)
E
eclipsess 已提交
292

293 294
    # gen test
    ADD_EXECUTABLE(test-mobilenet-combine net/test_mobilenet_combine.cpp test_helper.h test_include.h executor_for_test.h)
295 296
    target_link_libraries(test-mobilenet-combine paddle-mobile)

297
    # gen test
298
    ADD_EXECUTABLE(test-genet net/test_genet_combine.cpp test_helper.h test_include.h executor_for_test.h)
299 300
    target_link_libraries(test-genet paddle-mobile)

301
    # gen test
302
    ADD_EXECUTABLE(test-sigmoid operators/test_sigmoid_op.cpp test_include.h)
303
    target_link_libraries(test-sigmoid paddle-mobile)
W
wangliu 已提交
304

305 306 307
    # 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 已提交
308

L
liuruilong 已提交
309
    # gen test
310
    ADD_EXECUTABLE(test-mobilenet net/test_mobilenet.cpp test_helper.h test_include.h executor_for_test.h)
L
liuruilong 已提交
311 312
    target_link_libraries(test-mobilenet paddle-mobile)

L
liuruilong 已提交
313
    # gen test
314
    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 已提交
315 316
    target_link_libraries(test-conv-add-relu-op paddle-mobile)

317
    # gen test
318
    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)
319 320
    target_link_libraries(test-conv-add-bn-relu-op paddle-mobile)

xiebaiyuan's avatar
xiebaiyuan 已提交
321
    # gen test
322
    ADD_EXECUTABLE(test-nlp net/test_nlp.cpp test_helper.h test_include.h executor_for_test.h)
xiebaiyuan's avatar
xiebaiyuan 已提交
323 324 325
    target_link_libraries(test-nlp paddle-mobile)

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

Y
yangfei 已提交
329
    # gen test
Y
yangfei 已提交
330

331
    ADD_EXECUTABLE(test-inceptionv4 net/test_inceptionv4.cpp test_helper.h test_include.h executor_for_test.h)
Y
yangfei 已提交
332 333 334
    target_link_libraries(test-inceptionv4 paddle-mobile)

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

338
    ADD_EXECUTABLE(test-googlenetv1 net/test_googlenetv1_combine.cpp test_helper.h test_include.h)
339 340 341
    target_link_libraries(test-googlenetv1 paddle-mobile)

    # gen test
342
    ADD_EXECUTABLE(test-fssd net/test_mobilenet_025_fssd.cpp test_helper.h test_include.h)
343 344
    target_link_libraries(test-fssd paddle-mobile)

Y
yangfei 已提交
345 346 347 348
    # gen test
    ADD_EXECUTABLE(test-mobilenetgpu  net/test_mobilenet_GPU.cpp test_helper.h  test_include.h)
    target_link_libraries(test-mobilenetgpu paddle-mobile)

Y
yangfei 已提交
349 350 351
    # gen test
    ADD_EXECUTABLE(test-yologpu net/test_yologpu.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-yologpu paddle-mobile)
Y
yangfei 已提交
352

353 354 355 356
    # 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)

357 358 359 360
    # gen test
    ADD_EXECUTABLE(test-eng net/test_eng.cpp test_helper.h test_include.h)
    target_link_libraries(test-eng paddle-mobile)

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