CMakeLists.txt 2.0 KB
Newer Older
1 2
if(LITE_WITH_ARM)
    lite_cc_test(test_transformer_with_mask_fp32_arm SRCS test_transformer_with_mask_fp32_arm.cc
3 4 5 6 7 8
        DEPS ${lite_model_test_DEPS} paddle_api_full
        ARM_DEPS ${arm_kernels}
        ARGS --model_dir=${LITE_MODEL_DIR}/transformer_with_mask_fp32 SERIAL)
    if(WITH_TESTING)
        add_dependencies(test_transformer_with_mask_fp32_arm extern_lite_download_transformer_with_mask_fp32_tar_gz)
    endif()
9 10
endif()

11 12 13 14 15 16
function(xpu_x86_without_xtcl_test TARGET MODEL DATA)
    lite_cc_test(${TARGET} SRCS ${TARGET}.cc
        DEPS mir_passes lite_api_test_helper paddle_api_full paddle_api_light gflags utils
        ${ops} ${host_kernels} ${x86_kernels} ${xpu_kernels}
        ARGS --model_dir=${LITE_MODEL_DIR}/${MODEL}
             --data_dir=${LITE_MODEL_DIR}/${DATA})
17
    if(WITH_TESTING)
18 19 20 21
        add_dependencies(${TARGET} extern_lite_download_${MODEL}_tar_gz)
        if(NOT ${DATA} STREQUAL "")
            add_dependencies(${TARGET} extern_lite_download_${DATA}_tar_gz)
        endif()
22
    endif()
23 24 25 26 27 28 29 30
endfunction()

if(LITE_WITH_XPU AND NOT LITE_WITH_XTCL)
    xpu_x86_without_xtcl_test(test_resnet50_fp32_xpu resnet50 ILSVRC2012_small)
    xpu_x86_without_xtcl_test(test_googlenet_fp32_xpu GoogLeNet ILSVRC2012_small)
    xpu_x86_without_xtcl_test(test_vgg19_fp32_xpu VGG19 ILSVRC2012_small)
    xpu_x86_without_xtcl_test(test_ernie_fp32_xpu ernie "")
    xpu_x86_without_xtcl_test(test_bert_fp32_xpu bert "")
31
endif()
32 33 34

if(LITE_WITH_RKNPU)
    lite_cc_test(test_mobilenetv1_int8_rknpu SRCS test_mobilenetv1_int8_rknpu.cc
35 36 37
        DEPS ${lite_model_test_DEPS} paddle_api_full
        RKNPU_DEPS ${rknpu_kernels} ${rknpu_bridges}
        ARGS --model_dir=${LITE_MODEL_DIR}/MobilenetV1_full_quant SERIAL)
38
endif()
H
hong19860320 已提交
39 40 41

if(LITE_WITH_APU)
    lite_cc_test(test_mobilenetv1_int8_apu SRCS test_mobilenetv1_int8_apu.cc
42 43 44
        DEPS ${lite_model_test_DEPS} paddle_api_full
        APU_DEPS ${apu_kernels} ${apu_bridges}
        ARGS --model_dir=${LITE_MODEL_DIR}/MobilenetV1_full_quant SERIAL)
H
hong19860320 已提交
45
endif()