CMakeLists.txt 19.3 KB
Newer Older
Y
Yan Chunwei 已提交
1 2 3 4 5 6
if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK)
  lite_cc_library(place SRCS paddle_place.cc DEPS logging)
else()
  lite_cc_library(place SRCS paddle_place.cc DEPS glog)
endif(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK)

7
if (LITE_ON_TINY_PUBLISH)
8 9
    set(CMAKE_CXX_FLAGS_RELEASE "-Os -DNDEBUG")
    set(CMAKE_C_FLAGS_RELEASE "-Os -DNDEBUG")
10
endif()
11 12

set(light_lib_DEPS light_api paddle_api paddle_api_light)
H
huzhiqiang 已提交
13

14
if ((NOT LITE_ON_TINY_PUBLISH) AND (LITE_WITH_CUDA OR LITE_WITH_X86 OR LITE_WITH_BM OR ARM_TARGET_OS STREQUAL "android" OR ARM_TARGET_OS STREQUAL "armlinux"))
15
    #full api dynamic library
16 17
    lite_cc_library(paddle_full_api_shared SHARED SRCS paddle_api.cc light_api.cc cxx_api.cc cxx_api_impl.cc light_api_impl.cc
                  DEPS paddle_api paddle_api_light  paddle_api_full)
18 19
    add_dependencies(paddle_full_api_shared op_list_h kernel_list_h framework_proto)
    target_link_libraries(paddle_full_api_shared framework_proto)
H
huzhiqiang 已提交
20
    if(LITE_WITH_X86)
21 22
        add_dependencies(paddle_full_api_shared xxhash)
        target_link_libraries(paddle_full_api_shared xxhash)
23
        if (NOT LITE_ON_MODEL_OPTIMIZE_TOOL)
24 25
            add_dependencies(paddle_full_api_shared dynload_mklml)
        endif()
H
huzhiqiang 已提交
26
    endif()
27 28
    if(LITE_WITH_CUDA)
        target_link_libraries(paddle_full_api_shared ${math_cuda} "-Wl,--whole-archive" ${cuda_kernels} "-Wl,--no-whole-archive")
29 30
    endif(LITE_WITH_CUDA)

31
    #light api dynamic library
32 33 34 35 36
    lite_cc_library(paddle_light_api_shared SHARED SRCS paddle_api.cc light_api.cc light_api_impl.cc
                  DEPS ${light_lib_DEPS}
                  ARM_DEPS ${arm_kernels}
                  CV_DEPS paddle_cv_arm
                  NPU_DEPS ${npu_kernels}
37
                  RKNPU_DEPS ${rknpu_kernels}
38
                  )
39

40
    add_dependencies(paddle_light_api_shared op_list_h kernel_list_h)
41
    target_link_libraries(paddle_light_api_shared ${light_lib_DEPS} ${arm_kernels} ${npu_kernels} ${rknpu_kernels})
42 43 44 45 46 47 48 49
    if(NOT APPLE)
        set(LINK_MAP_FILE "${PADDLE_SOURCE_DIR}/lite/core/lite.map")
        set(LINK_FLAGS "-Wl,--version-script ${LINK_MAP_FILE}")
        add_custom_command(OUTPUT ${LINK_MAP_FILE} COMMAND ...)
        add_custom_target(custom_linker_map DEPENDS ${LINK_MAP_FILE})
        set_target_properties(paddle_full_api_shared PROPERTIES LINK_FLAGS ${LINK_FLAGS})
        add_dependencies(paddle_full_api_shared custom_linker_map)
   endif()
50
else()
51
    if ((ARM_TARGET_OS STREQUAL "android") OR (ARM_TARGET_OS STREQUAL "armlinux"))
52 53
        add_library(paddle_light_api_shared SHARED "")
        target_sources(paddle_light_api_shared PUBLIC ${__lite_cc_files} paddle_api.cc light_api.cc light_api_impl.cc)
54 55 56
        set(TARGET_COMIPILE_FLAGS "-fdata-sections")
        if (NOT (ARM_TARGET_LANG STREQUAL "clang")) #gcc
            set(TARGET_COMIPILE_FLAGS "${TARGET_COMIPILE_FLAGS} -flto")
57
        endif()
58
        set_target_properties(paddle_light_api_shared PROPERTIES COMPILE_FLAGS "${TARGET_COMIPILE_FLAGS}")
H
HappyAngel 已提交
59
        add_dependencies(paddle_light_api_shared op_list_h kernel_list_h)
60 61
        if (LITE_WITH_NPU)
            # Need to add HIAI runtime libs (libhiai.so) dependency
62
            target_link_libraries(paddle_light_api_shared ${npu_builder_libs} ${npu_runtime_libs})
63
        endif()
64 65 66 67 68
        if (LITE_WITH_RKNPU)
            # Need to add RKNPU runtime libs dependency
            target_link_libraries(paddle_light_api_shared ${rknpu_builder_libs} ${rknpu_runtime_libs})
        endif()

69 70 71
    endif()
endif()

Y
Yan Chunwei 已提交
72 73 74 75
if (WITH_TESTING)
    lite_cc_library(lite_api_test_helper SRCS lite_api_test_helper.cc
      DEPS scope optimizer target_wrapper_host model_parser program
           ${ops} ${host_kernels}
76
      CUDA_DEPS ${cuda_kernels}
77
      X86_DEPS ${x86_kernels}
78
      XPU_DEPS ${xpu_kernels}
79
      RKNPU_DEPS ${rknpu_kernels}
80 81
      BM_DEPS ${bm_kernels}
      MLU_DEPS ${mlu_kernels})
Y
Yan Chunwei 已提交
82 83 84 85 86 87
endif()
if(LITE_WITH_FPGA)
    set(light_api_deps ${light_api_deps} ${fpga_deps})
    set(cxx_api_deps ${cxx_api_deps} ${fpga_deps})
endif()

88 89 90 91 92
if(LITE_WITH_BM)
    set(light_api_deps ${light_api_deps} ${bm_deps})
    set(cxx_api_deps ${cxx_api_deps} ${bm_deps})
endif()

93 94 95 96 97 98
if(LITE_WITH_RKNPU)
    set(light_api_deps ${light_api_deps} ${rknpu_deps})
    set(cxx_api_deps ${cxx_api_deps} ${rknpu_deps})
endif()


Y
Yan Chunwei 已提交
99
message(STATUS "get ops ${ops}")
100
message(STATUS "get X86 kernels ${x86_kernels}")
101
message(STATUS "get CUDA kernels ${cuda_kernels}")
Y
Yan Chunwei 已提交
102 103
message(STATUS "get Host kernels ${host_kernels}")
message(STATUS "get ARM kernels ${arm_kernels}")
104
message(STATUS "get OpenCL kernels ${opencl_kernels}")
Y
Yan Chunwei 已提交
105
message(STATUS "get NPU kernels ${npu_kernels}")
106
message(STATUS "get XPU kernels ${xpu_kernels}")
107
message(STATUS "get RKNPU kernels ${rknpu_kernels}")
Y
Yan Chunwei 已提交
108
message(STATUS "get FPGA kernels ${fpga_kernels}")
109
message(STATUS "get BM kernels ${bm_kernels}")
110
message(STATUS "get MLU kernels ${mlu_kernels}")
Y
Yan Chunwei 已提交
111 112 113 114

# for full api
if (NOT LITE_ON_TINY_PUBLISH)
    set(cxx_api_deps
115
    scope optimizer target_wrapper_host model_parser program)
Y
Yan Chunwei 已提交
116
    lite_cc_library(cxx_api
117 118 119
                        SRCS cxx_api.cc
                        DEPS ${cxx_api_deps} ${ops} ${host_kernels} program
                        X86_DEPS ${x86_kernels}
120
                        CUDA_DEPS ${cuda_kernels}
121 122
                        ARM_DEPS ${arm_kernels}
                        CV_DEPS paddle_cv_arm
Z
zhupengyang 已提交
123 124
                        NPU_DEPS ${npu_kernels}
                        XPU_DEPS ${xpu_kernels}
125
                        RKNPU_DEPS ${rknpu_kernels}
126
                        BM_DEPS ${bm_kernels}
127 128
                        CL_DEPS ${opencl_kernels}
                        FPGA_DEPS ${fpga_kernels})
Y
Yan Chunwei 已提交
129 130 131 132 133 134
endif()

# for light api
set(light_api_deps
    scope target_wrapper_host model_parser program)
if(LITE_WITH_CUDA)
135
    get_property(cuda_deps GLOBAL PROPERTY CUDA_MODULES)
Y
Yan Chunwei 已提交
136 137 138 139 140
    set(light_api_deps ${light_api_deps} target_wrapper_cuda)
endif()
lite_cc_library(light_api SRCS light_api.cc
        DEPS scope target_wrapper_host model_parser
            ${light_api_deps} ${ops} ${host_kernels} program
141
        CUDA_DEPS ${cuda_kernels}
Y
Yan Chunwei 已提交
142 143
        X86_DEPS ${x86_kernels}
        ARM_DEPS ${arm_kernels}
144
        CV_DEPS paddle_cv_arm
145
        NPU_DEPS ${npu_kernels}
146
        XPU_DEPS ${xpu_kernels}
147
        RKNPU_DEPS ${rknpu_kernels}
148
        CL_DEPS ${opencl_kernels}
149
        FPGA_DEPS ${fpga_kernels}
150 151
        BM_DEPS ${bm_kernels}
        MLU_DEPS ${mlu_kernels})
Y
Yan Chunwei 已提交
152 153 154 155 156 157 158 159 160 161

include(ExternalProject)
set(LITE_DEMO_INSTALL_DIR "${THIRD_PARTY_PATH}/inference_demo" CACHE STRING
        "A path setting inference demo download directories.")

if(WITH_TESTING)
    lite_cc_test(test_cxx_api SRCS cxx_api_test.cc
       DEPS cxx_api mir_passes lite_api_test_helper
       ${ops} ${host_kernels}
       X86_DEPS ${x86_kernels}
162
       CUDA_DEPS ${cuda_kernels}
Y
Yan Chunwei 已提交
163
       ARM_DEPS ${arm_kernels}
H
HappyAngel 已提交
164
       CV_DEPS paddle_cv_arm
Y
Yan Chunwei 已提交
165
       NPU_DEPS ${npu_kernels}
166
       XPU_DEPS ${xpu_kernels}
167
       RKNPU_DEPS ${rknpu_kernels}
Y
Yan Chunwei 已提交
168 169
       CL_DEPS ${opencl_kernels}
       FPGA_DEPS ${fpga_kernels}
170
       BM_DEPS ${bm_kernels}
171
       MLU_DEPS ${mlu_kernels}
Y
Yan Chunwei 已提交
172 173 174 175 176
       EXCLUDE_COMPILE_DEPS "ON"
       ARGS --model_dir=${LITE_MODEL_DIR}/lite_naive_model
            --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL)
    add_dependencies(test_cxx_api extern_lite_download_lite_naive_model_tar_gz)
    if(NOT LITE_WITH_LIGHT_WEIGHT_FRAMEWORK)
177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
        if(LITE_WITH_X86)
            lite_cc_test(test_googlenet SRCS test_googlenet_lite.cc
               DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
               ${ops} ${host_kernels} ${x86_kernels}
               ARGS --model_dir=${LITE_MODEL_DIR}/googlenet)
            add_dependencies(test_googlenet extern_lite_download_GoogleNet_inference_tar_gz)
            lite_cc_test(test_mobilenetv1_lite_x86 SRCS test_mobilenetv1_lite_x86.cc
               DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
               ${ops} ${host_kernels} ${x86_kernels}
               ARGS --model_dir=${LITE_MODEL_DIR}/mobilenet_v1)
            add_dependencies(test_mobilenetv1_lite_x86 extern_lite_download_mobilenet_v1_tar_gz)
            lite_cc_test(test_mobilenetv2_lite_x86 SRCS test_mobilenetv2_lite_x86.cc
               DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
               ${ops} ${host_kernels} ${x86_kernels}
               ARGS --model_dir=${LITE_MODEL_DIR}/mobilenet_v2_relu)
            add_dependencies(test_mobilenetv2_lite_x86 extern_lite_download_mobilenet_v2_relu_tar_gz)
            lite_cc_test(test_inceptionv4_lite_x86 SRCS test_inceptionv4_lite_x86.cc
               DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
               ${ops} ${host_kernels} ${x86_kernels}
               ARGS --model_dir=${LITE_MODEL_DIR}/inception_v4_simple)
            add_dependencies(test_inceptionv4_lite_x86 extern_lite_download_inception_v4_simple_tar_gz)
            lite_cc_test(test_resnet50_lite_x86 SRCS test_resnet50_lite_x86.cc
               DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
               ${ops} ${host_kernels} ${x86_kernels}
               ARGS --model_dir=${LITE_MODEL_DIR}/resnet50)
            add_dependencies(test_resnet50_lite_x86 extern_lite_download_resnet50_tar_gz)
            lite_cc_test(test_step_rnn_lite_x86 SRCS test_step_rnn_lite_x86.cc
               DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
               ${ops} ${host_kernels} ${x86_kernels}
               ARGS --model_dir=${LITE_MODEL_DIR}/step_rnn)
            add_dependencies(test_step_rnn_lite_x86 extern_lite_download_step_rnn_tar_gz)
        endif()
209
        if(LITE_WITH_BM)
210
           lite_cc_test(test_classify_lite_bm SRCS test_classify_lite_bm.cc
211 212
              DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
              ${ops} ${host_kernels} ${bm_kernels} ${bm_bridges}
213 214 215 216 217
              ARGS --model_dir=${LITE_MODEL_DIR}/classify)
           lite_cc_test(test_yolov3_lite_bm SRCS test_yolov3_lite_bm.cc
              DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
              ${ops} ${host_kernels} ${bm_kernels} ${bm_bridges}
              ARGS --model_dir=${LITE_MODEL_DIR}/yolov3)
218
        endif()
Y
Yan Chunwei 已提交
219 220 221 222 223 224 225 226 227
    endif()
endif()

if(LITE_WITH_LIGHT_WEIGHT_FRAMEWORK AND WITH_TESTING)
    set(lite_model_test_DEPS cxx_api mir_passes ${ops} ${host_kernels} ${arm_kernels} ${npu_kernels} ${fpga_kernels})

    lite_cc_test(test_mobilenetv1_int8 SRCS mobilenetv1_int8_test.cc
       DEPS ${lite_model_test_DEPS}
       CL_DEPS ${opencl_kernels}
228
       ARGS --cl_path=${CMAKE_SOURCE_DIR}/lite/backends/opencl
Y
Yan Chunwei 已提交
229 230 231 232 233 234 235
        --model_dir=${LITE_MODEL_DIR}/MobilenetV1_quant SERIAL)
    add_dependencies(test_mobilenetv1_int8 extern_lite_download_MobileNetV1_quant_tar_gz)

    lite_cc_test(test_mobilenetv1 SRCS mobilenetv1_test.cc
       DEPS ${lite_model_test_DEPS}
       CL_DEPS ${opencl_kernels}
       NPU_DEPS ${npu_kernels} ${npu_bridges}
236
       ARGS --cl_path=${CMAKE_SOURCE_DIR}/lite/backends/opencl
Y
Yan Chunwei 已提交
237 238 239 240
            --model_dir=${LITE_MODEL_DIR}/mobilenet_v1 SERIAL)
    add_dependencies(test_mobilenetv1 extern_lite_download_mobilenet_v1_tar_gz)
    set(LINK_FLAGS "-Wl,--version-script ${PADDLE_SOURCE_DIR}/lite/core/lite.map")
    set_target_properties(test_mobilenetv1 PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
241

Y
Yan Chunwei 已提交
242 243 244
    lite_cc_test(test_mobilenetv2 SRCS mobilenetv2_test.cc
       DEPS ${lite_model_test_DEPS}
       CL_DEPS ${opencl_kernels}
245
       ARGS --cl_path=${CMAKE_SOURCE_DIR}/lite/backends/opencl
Y
Yan Chunwei 已提交
246 247 248
            --model_dir=${LITE_MODEL_DIR}/mobilenet_v2_relu SERIAL)
    add_dependencies(test_mobilenetv2 extern_lite_download_mobilenet_v2_relu_tar_gz)
    set_target_properties(test_mobilenetv2 PROPERTIES LINK_FLAGS "${LINK_FLAGS}")
249

Y
Yan Chunwei 已提交
250
    lite_cc_test(test_resnet50 SRCS resnet50_test.cc
251
       DEPS ${lite_model_test_DEPS} paddle_api_light
Y
Yan Chunwei 已提交
252 253
       CL_DEPS ${opencl_kernels}
       FPGA_DEPS ${fpga_kernels}
254
       ARGS --cl_path=${CMAKE_SOURCE_DIR}/lite/backends/opencl
Y
Yan Chunwei 已提交
255 256 257 258 259 260 261 262 263 264 265
            --model_dir=${LITE_MODEL_DIR}/resnet50 SERIAL)
    add_dependencies(test_resnet50 extern_lite_download_resnet50_tar_gz)

    lite_cc_test(test_resnet50_fpga SRCS resnet50_test_fpga.cc
       DEPS ${lite_model_test_DEPS}
       CL_DEPS ${opencl_kernels}
       FPGA_DEPS ${fpga_kernels})

    lite_cc_test(test_inceptionv4 SRCS inceptionv4_test.cc
       DEPS ${lite_model_test_DEPS}
       CL_DEPS ${opencl_kernels}
266
       ARGS --cl_path=${CMAKE_SOURCE_DIR}/lite/backends/opencl
Y
Yan Chunwei 已提交
267
            --model_dir=${LITE_MODEL_DIR}/inception_v4 SERIAL)
268
    add_dependencies(test_inceptionv4 extern_lite_download_inception_v4_simple_tar_gz)
269

X
xiaogang 已提交
270
   # brief: we comment ocr_test_ut because we do not supply ocr model to test, it is the reference to infer nlp model
T
TianXiaogang 已提交
271 272 273 274 275 276 277
   # lite_cc_test(test_ocr_attention SRCS ocr_attention_test.cc
   #    DEPS ${lite_model_test_DEPS})

   # lite_cc_test(model_run_test_image SRCS model_run_test_image.cc
   #    DEPS ${lite_model_test_DEPS}
   #    CL_DEPS ${opencl_kernels}
   #    FPGA_DEPS ${fpga_kernels})
Y
Yan Chunwei 已提交
278 279
endif()

280
lite_cc_library(paddle_api SRCS paddle_api.cc DEPS op_params tensor device_info)
Y
Yan Chunwei 已提交
281 282 283

#-----------------------------------------------------------------------------------------------------
# The final inference library for both CxxConfig and MobileConfig.
284 285 286 287 288
if (LITE_ON_TINY_PUBLISH)
    lite_cc_library(paddle_api_light SRCS light_api_impl.cc DEPS light_api paddle_api stream)
else()
    lite_cc_library(paddle_api_light SRCS light_api_impl.cc DEPS light_api paddle_api)
endif()
Y
Yan Chunwei 已提交
289
if (NOT LITE_ON_TINY_PUBLISH)
290
    lite_cc_library(paddle_api_full SRCS cxx_api_impl.cc DEPS cxx_api paddle_api_light
291 292 293 294 295
        ${ops}
        ARM_DEPS ${arm_kernels}
        CV_DEPS paddle_cv_arm
        NPU_DEPS ${npu_kernels}
        CL_DEPS ${opencl_kernels}
296 297
        FPGA_DEPS ${fpga_kernels}
        BM_DEPS ${bm_kernels})
Y
Yan Chunwei 已提交
298 299
    # The final inference library for just MobileConfig.
    bundle_static_library(paddle_api_full paddle_api_full_bundled bundle_full_api)
300
    target_link_libraries(paddle_api_full ${cuda_deps})
301
    get_property(fluid_modules GLOBAL PROPERTY FLUID_MODULES)
Y
Yan Chunwei 已提交
302
endif()
303

Y
Yan Chunwei 已提交
304 305 306
bundle_static_library(paddle_api_light paddle_api_light_bundled bundle_light_api)
#-----------------------------------------------------------------------------------------------------

307 308 309 310 311 312
# These tests needs CLI arguments, and is not supported in ARM CI.
# TODO(Superjomn) support latter.
lite_cc_test(test_light_api SRCS light_api_test.cc
        DEPS light_api program mir_passes paddle_api_light
        CL_DEPS ${opencl_kernels}
        FPGA_DEPS ${fpga_kernels}
313
        RKNPU_DEPS ${rknpu_kernels}
314
        BM_DEPS ${bm_kernels}
315 316 317 318 319 320
        ARGS --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL)

lite_cc_test(test_apis SRCS apis_test.cc
        DEPS cxx_api light_api ${ops} paddle_api_light
        CL_DEPS ${opencl_kernels}
        X86_DEPS ${x86_kernels}
321
        XPU_DEPS ${xpu_kernels}
322
        FPGA_DEPS ${fpga_kernels}
323
        RKNPU_DEPS ${rknpu_kernels}
324
        BM_DEPS ${bm_kernels}
325
        MLU_DEPS ${mlu_kernels}
326 327 328
        ARGS --model_dir=${LITE_MODEL_DIR}/lite_naive_model
        --optimized_model=${LITE_MODEL_DIR}/lite_naive_model_opt SERIAL)

Y
Yan Chunwei 已提交
329 330 331 332
if (LITE_WITH_JAVA AND LITE_WITH_ARM)
    add_subdirectory(android)
endif()

333
if (LITE_WITH_PYTHON)
S
sangoly 已提交
334 335 336
    add_subdirectory(python)
endif()

Y
Yan Chunwei 已提交
337 338 339
if (LITE_ON_TINY_PUBLISH)
    return()
endif()
340

341 342 343 344 345

# add library for opt_base
lite_cc_library(opt_base SRCS opt_base.cc cxx_api_impl.cc paddle_api.cc cxx_api.cc DEPS kernel op optimizer mir_passes utils)
add_dependencies(opt_base supported_kernel_op_info_h framework_proto all_kernel_faked_cc kernel_list_h)

346
if (LITE_ON_MODEL_OPTIMIZE_TOOL)
347 348
    message(STATUS "Compiling opt")
    lite_cc_binary(opt SRCS opt.cc cxx_api_impl.cc paddle_api.cc cxx_api.cc
349
        DEPS gflags kernel op optimizer mir_passes utils ${host_kernels})
350
    add_dependencies(opt op_list_h kernel_list_h all_kernel_faked_cc supported_kernel_op_info_h)
351 352
endif(LITE_ON_MODEL_OPTIMIZE_TOOL)

Y
Yan Chunwei 已提交
353 354 355
lite_cc_test(test_paddle_api SRCS paddle_api_test.cc DEPS paddle_api_full paddle_api_light
  ${ops}
  ARM_DEPS ${arm_kernels}
H
HappyAngel 已提交
356
  CV_DEPS paddle_cv_arm
Y
Yan Chunwei 已提交
357
  NPU_DEPS ${npu_kernels}
358
  XPU_DEPS ${xpu_kernels}
359
  RKNPU_DEPS ${rknpu_kernels}
Y
Yan Chunwei 已提交
360 361 362
  CL_DEPS ${opencl_kernels}
  X86_DEPS ${x86_kernels}
  FPGA_DEPS ${fpga_kernels}
363
  BM_DEPS ${bm_kernels}
364
  MLU_DEPS ${mlu_kernels}
Y
Yan Chunwei 已提交
365 366 367 368 369 370 371
  ARGS --model_dir=${LITE_MODEL_DIR}/lite_naive_model SERIAL)
if (WITH_TESTING)
    add_dependencies(test_paddle_api extern_lite_download_lite_naive_model_tar_gz)
endif()

# Some bins
if(NOT IOS)
372 373 374 375 376 377
    lite_cc_binary(test_model_bin SRCS model_test.cc DEPS paddle_api_full paddle_api_light gflags utils
        ${ops} ${host_kernels}
        ARM_DEPS ${arm_kernels}
        CV_DEPS paddle_cv_arm
        NPU_DEPS ${npu_kernels}
        XPU_DEPS ${xpu_kernels}
378
        MLU_DEPS ${mlu_kernels}
379
        CL_DEPS ${opencl_kernels}
380
        BM_DEPS ${bm_kernels}
381
        RKNPU_DEPS ${rknpu_kernels}
382 383 384
        FPGA_DEPS ${fpga_kernels}
        X86_DEPS ${x86_kernels}
        CUDA_DEPS ${cuda_kernels})
385 386 387 388 389 390 391
    
    lite_cc_binary(test_model_detection_bin SRCS model_test_detection.cc DEPS paddle_api_full paddle_api_light gflags utils
        ${ops} ${host_kernels}
        ARM_DEPS ${arm_kernels}
        CV_DEPS paddle_cv_arm
        NPU_DEPS ${npu_kernels}
        XPU_DEPS ${xpu_kernels}
392
        MLU_DEPS ${mlu_kernels}
393 394
        CL_DEPS ${opencl_kernels}
        BM_DEPS ${bm_kernels}
395
        RKNPU_DEPS ${rknpu_kernels}
396 397 398 399 400 401 402 403 404 405
        FPGA_DEPS ${fpga_kernels}
        X86_DEPS ${x86_kernels}
        CUDA_DEPS ${cuda_kernels})
    
    lite_cc_binary(test_model_classify_bin SRCS model_test_classify.cc DEPS paddle_api_full paddle_api_light gflags utils
        ${ops} ${host_kernels}
        ARM_DEPS ${arm_kernels}
        CV_DEPS paddle_cv_arm
        NPU_DEPS ${npu_kernels}
        XPU_DEPS ${xpu_kernels}
406
        MLU_DEPS ${mlu_kernels}
407 408
        CL_DEPS ${opencl_kernels}
        BM_DEPS ${bm_kernels}
409
        RKNPU_DEPS ${rknpu_kernels}
410 411 412
        FPGA_DEPS ${fpga_kernels}
        X86_DEPS ${x86_kernels}
        CUDA_DEPS ${cuda_kernels})
H
HappyAngel 已提交
413

414 415 416
    lite_cc_binary(benchmark_bin SRCS benchmark.cc DEPS paddle_api_full paddle_api_light gflags utils
        ${ops} ${host_kernels}
        ARM_DEPS ${arm_kernels}
H
HappyAngel 已提交
417
        CV_DEPS paddle_cv_arm
418 419
        NPU_DEPS ${npu_kernels}
        XPU_DEPS ${xpu_kernels}
420
        RKNPU_DEPS ${rknpu_kernels}
421
        MLU_DEPS ${mlu_kernels}
422 423 424 425
        CL_DEPS ${opencl_kernels}
        FPGA_DEPS ${fpga_kernels}
        X86_DEPS ${x86_kernels}
        CUDA_DEPS ${cuda_kernels})
426
    
X
xiaogang 已提交
427 428 429 430 431 432
    lite_cc_binary(multithread_test SRCS lite_multithread_test.cc DEPS paddle_api_full paddle_api_light gflags utils
        ${ops} ${host_kernels}
        ARM_DEPS ${arm_kernels}
        CV_DEPS paddle_cv_arm
        NPU_DEPS ${npu_kernels}
        XPU_DEPS ${xpu_kernels}
433
        RKNPU_DEPS ${rknpu_kernels}
434
        MLU_DEPS ${mlu_kernels}
X
xiaogang 已提交
435
        CL_DEPS ${opencl_kernels}
436
	BM_DEPS ${bm_kernels}
X
xiaogang 已提交
437 438 439
        FPGA_DEPS ${fpga_kernels}
        X86_DEPS ${x86_kernels}
        CUDA_DEPS ${cuda_kernels})
440

X
xiaogang 已提交
441 442 443 444 445
    lite_cc_binary(test_transformer SRCS transform_test.cc DEPS paddle_api_full paddle_api_light gflags utils
        ${ops} ${host_kernels}
        ARM_DEPS ${arm_kernels}
        CV_DEPS paddle_cv_arm
        NPU_DEPS ${npu_kernels}
446
        RKNPU_DEPS ${npu_kernels}
X
xiaogang 已提交
447 448 449 450 451
        XPU_DEPS ${xpu_kernels}
        CL_DEPS ${opencl_kernels}
        FPGA_DEPS ${fpga_kernels}
        X86_DEPS ${x86_kernels}
        CUDA_DEPS ${cuda_kernels})
Y
Yan Chunwei 已提交
452 453 454 455 456 457
endif()

#lite_cc_binary(cxx_api_bin SRCS cxx_api_bin.cc
    #X86_DEPS operator
    #DEPS light_api model_parser target_wrapper_host mir_passes
    #ARM_DEPS ${arm_kernels}) NPU_DEPS ${npu_kernels})