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

L
liuruilong 已提交
4
if ("googlenet" IN_LIST NET)
5 6 7
    # gen test
    ADD_EXECUTABLE(test-googlenet net/test_googlenet.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-googlenet paddle-mobile)
L
liuruilong 已提交
8
elseif ("mobilenet" IN_LIST NET)
9 10 11
    # gen test
    ADD_EXECUTABLE(test-mobilenet net/test_mobilenet.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-mobilenet paddle-mobile)
12 13 14 15 16

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

L
liuruilong 已提交
17
elseif ("yolo" IN_LIST NET)
18 19 20
    # gen test
    ADD_EXECUTABLE(test-yolo net/test_yolo.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-yolo paddle-mobile)
xiebaiyuan's avatar
xiebaiyuan 已提交
21 22 23
    # gen test
    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)
L
liuruilong 已提交
24
elseif ("squeezenet" IN_LIST NET)
25 26 27
    # gen test
    ADD_EXECUTABLE(test-squeezenet net/test_squeezenet.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-squeezenet paddle-mobile)
L
liuruilong 已提交
28
elseif("resnet" IN_LIST NET)
29 30 31
    # gen test
    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)
Z
zhangyang 已提交
32
elseif("FPGAnets" IN_LIST NET)
Z
zhangyang 已提交
33 34 35
    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)

Z
zhangyang 已提交
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
    ADD_EXECUTABLE(test-resnet50 fpga/test_resnet50.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-resnet50 paddle-mobile)

    ADD_EXECUTABLE(test-fpga-EW fpga/test_fpga_EW.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-fpga-EW paddle-mobile)

    ADD_EXECUTABLE(test-fpga-conv fpga/test_fpga_conv.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-fpga-conv paddle-mobile)

    ADD_EXECUTABLE(test-fpga-pooling fpga/test_fpga_pooling.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-fpga-pooling paddle-mobile)

    ADD_EXECUTABLE(test-fpga-bypass fpga/test_fpga_bypass.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-fpga-bypass paddle-mobile)

    ADD_EXECUTABLE(test-fpga-softmax fpga/test_fpga_softmax.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-fpga-softmax paddle-mobile)

    ADD_EXECUTABLE(test-fpga-concat fpga/test_fpga_concat.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-fpga-concat paddle-mobile)

C
chonwhite 已提交
57 58
    ADD_EXECUTABLE(test-tensor-quant fpga/test_tensor_quant.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-tensor-quant paddle-mobile)
59 60 61

    ADD_EXECUTABLE(test-fpga-concat-op fpga/test_concat_op.cpp test_helper.h  test_include.h)
    target_link_libraries(test-fpga-concat-op paddle-mobile)
Z
zhangyang 已提交
62 63 64

    ADD_EXECUTABLE(test-format-data fpga/test_format_data.cpp test_helper.h  test_include.h)
    target_link_libraries(test-format-data paddle-mobile)
65 66 67 68
elseif("mobilenetssd" IN_LIST NET)
    # gen test
    ADD_EXECUTABLE(test-mobilenetssd net/test_mobilenet+ssd.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-mobilenetssd paddle-mobile)
69 70 71 72 73 74 75 76 77

elseif("nlp" IN_LIST NET)
    # gen test
    ADD_EXECUTABLE(test-nlp net/test_nlp.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-nlp paddle-mobile)

    # gen test
    ADD_EXECUTABLE(test-gru-op  operators/test_gru_op.cpp test_helper.h  test_include.h)
    target_link_libraries(test-gru-op paddle-mobile)
xiebaiyuan's avatar
xiebaiyuan 已提交
78 79 80 81
elseif("mobilenetfssd" IN_LIST NET)
    # gen test
    ADD_EXECUTABLE(test-fssd  net/test_mobilenet_025_fssd.cpp test_helper.h  test_include.h)
    target_link_libraries(test-fssd paddle-mobile)
xiebaiyuan's avatar
xiebaiyuan 已提交
82 83 84 85 86

elseif("genet" IN_LIST NET)
    # gen test
    ADD_EXECUTABLE(test-genet net/test_genet_combine.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-genet paddle-mobile)
87
else ()
L
liuruilong 已提交
88 89 90 91 92 93 94 95 96 97 98 99 100

    # gen test
    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)

    # gen test
    ADD_EXECUTABLE(test-squeezenet net/test_squeezenet.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-squeezenet paddle-mobile)

    # gen test
    ADD_EXECUTABLE(test-yolo net/test_yolo.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-yolo paddle-mobile)

xiebaiyuan's avatar
xiebaiyuan 已提交
101 102 103 104
    # gen test
    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)

L
liuruilong 已提交
105 106 107 108
    # gen test
    ADD_EXECUTABLE(test-googlenet net/test_googlenet.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-googlenet paddle-mobile)

109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
    # gen test
    ADD_EXECUTABLE(test-conv-op  operators/test_cov_op.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-conv-op paddle-mobile)

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

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

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

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

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

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

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

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

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

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

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

    # gen test
L
liuruilong 已提交
158
    ADD_EXECUTABLE(test-fc-op  operators/test_fusion_fc_op.cpp test_helper.h  test_include.h)
159 160 161 162 163 164 165 166 167 168
    target_link_libraries(test-fc-op paddle-mobile)

    # 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)

169 170 171 172
    # gen test log
    ADD_EXECUTABLE(test-loadmemory framework/test_load_memory.cpp)
    target_link_libraries(test-loadmemory paddle-mobile)

N
nhzlx 已提交
173 174 175 176
    ADD_EXECUTABLE(test-inference-api framework/test_inference_api.cpp)
    target_link_libraries(test-inference-api paddle-mobile)


177 178 179 180 181 182 183 184 185 186 187 188 189 190 191
    # 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
192 193 194 195 196 197
    ADD_EXECUTABLE(test-gemm-accuracy common/test_gemm_accuracy.cpp)
    target_link_libraries(test-gemm-accuracy paddle-mobile)

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

199 200 201
    # gen test
    ADD_EXECUTABLE(test-enforce common/test_enforce.cpp)
    target_link_libraries(test-enforce paddle-mobile)
L
liuruilong 已提交
202

D
dolphin8 已提交
203
    # gen test - test if openmp works
L
liuruilong 已提交
204
    ADD_EXECUTABLE(test-openmp common/test_openmp.cpp test_helper.h test_include.h executor_for_test.h)
D
dolphin8 已提交
205
    target_link_libraries(test-openmp paddle-mobile)
L
liuruilong 已提交
206

207 208 209
    # gen test
    ADD_EXECUTABLE(test-mobilenetssd net/test_mobilenet+ssd.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-mobilenetssd paddle-mobile)
E
eclipsess 已提交
210

211 212 213 214
     # gen test
    ADD_EXECUTABLE(test-mobilenet-combine net/test_mobilenet_combine.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-mobilenet-combine paddle-mobile)

215 216 217 218
    # gen test
    ADD_EXECUTABLE(test-genet net/test_genet_combine.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-genet paddle-mobile)

219 220 221
    # gen test
    ADD_EXECUTABLE(test-sigmoid operators/test_sigmoid_op.cpp  test_include.h)
    target_link_libraries(test-sigmoid paddle-mobile)
W
wangliu 已提交
222

223 224 225
    # 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 已提交
226

L
liuruilong 已提交
227 228 229 230
    # gen test
    ADD_EXECUTABLE(test-mobilenet net/test_mobilenet.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-mobilenet paddle-mobile)

L
liuruilong 已提交
231 232 233 234
    # gen test
    ADD_EXECUTABLE(test-conv-add-relu-op operators/test_conv_add_relu_op.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-conv-add-relu-op paddle-mobile)

235 236 237 238
    # gen test
    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)
    target_link_libraries(test-conv-add-bn-relu-op paddle-mobile)

xiebaiyuan's avatar
xiebaiyuan 已提交
239 240 241 242 243 244 245 246
    # gen test
    ADD_EXECUTABLE(test-nlp net/test_nlp.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-nlp paddle-mobile)

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

Y
yangfei 已提交
247
    # gen test
Y
yangfei 已提交
248

Y
yangfei 已提交
249 250 251 252 253 254 255
    ADD_EXECUTABLE(test-inceptionv4 net/test_inceptionv4.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-inceptionv4 paddle-mobile)

    # gen test
    ADD_EXECUTABLE(test-alexnet net/test_alexnet.cpp test_helper.h  test_include.h executor_for_test.h)
    target_link_libraries(test-alexnet paddle-mobile)

256 257 258 259 260 261 262
    ADD_EXECUTABLE(test-googlenetv1  net/test_googlenetv1_combine.cpp test_helper.h  test_include.h)
    target_link_libraries(test-googlenetv1 paddle-mobile)

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

Y
yangfei 已提交
263

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

H
hanbuhe 已提交
266
endif()