File tree Expand file tree Collapse file tree 4 files changed +36
-32
lines changed Expand file tree Collapse file tree 4 files changed +36
-32
lines changed Original file line number Diff line number Diff line change 11add_definitions (-DPADDLE_DLL_EXPORT)
22if (WITH_TESTING)
33 include (test .cmake) # some generic cmake function for inference
4+ include (test_cases.cmake)
45endif ()
56
67add_subdirectory (analysis)
Original file line number Diff line number Diff line change @@ -73,35 +73,6 @@ function(inference_download_and_uncompress_without_verify INSTALL_DIR URL
7373 INSTALL_COMMAND "" )
7474endfunction ()
7575
76- set (WORD2VEC_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR} /word2vec" )
77- if (NOT EXISTS ${WORD2VEC_INSTALL_DIR} /word2vec.inference.model.tar.gz)
78- inference_download_and_uncompress_without_verify(
79- ${WORD2VEC_INSTALL_DIR} ${INFERENCE_URL} "word2vec.inference.model.tar.gz" )
80- endif ()
81- set (WORD2VEC_MODEL_DIR "${WORD2VEC_INSTALL_DIR} /word2vec.inference.model" )
82-
83- set (IMG_CLS_RESNET_INSTALL_DIR
84- "${INFERENCE_DEMO_INSTALL_DIR} /image_classification_resnet" )
85- if (NOT EXISTS
86- ${IMG_CLS_RESNET_INSTALL_DIR} /image_classification_resnet.inference.model.tgz
87- )
88- inference_download_and_uncompress_without_verify(
89- ${IMG_CLS_RESNET_INSTALL_DIR} ${INFERENCE_URL}
90- "image_classification_resnet.inference.model.tgz" )
91- endif ()
92- set (IMG_CLS_RESNET_MODEL_DIR
93- "${IMG_CLS_RESNET_INSTALL_DIR} /image_classification_resnet.inference.model" )
94-
95- if (WITH_ONNXRUNTIME)
96- set (MOBILENETV2_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR} /MobileNetV2" )
97- if (NOT EXISTS ${MOBILENETV2_INSTALL_DIR} /MobileNetV2.inference.model.tar.gz)
98- inference_download_and_uncompress_without_verify(
99- ${MOBILENETV2_INSTALL_DIR} ${INFERENCE_URL}
100- "MobileNetV2.inference.model.tar.gz" )
101- endif ()
102- set (MOBILENETV2_MODEL_DIR "${MOBILENETV2_INSTALL_DIR} /MobileNetV2" )
103- endif ()
104-
10576function (inference_base_test_build TARGET )
10677 set (options "" )
10778 set (oneValueArgs "" )
Original file line number Diff line number Diff line change 1+ include (test .cmake) # some generic cmake function for inference
2+
3+ set (WORD2VEC_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR} /word2vec" )
4+
5+ if (NOT EXISTS ${WORD2VEC_INSTALL_DIR} /word2vec.inference.model.tar.gz)
6+ inference_download_and_uncompress_without_verify(
7+ ${WORD2VEC_INSTALL_DIR} ${INFERENCE_URL} "word2vec.inference.model.tar.gz" )
8+ endif ()
9+
10+ set (WORD2VEC_MODEL_DIR "${WORD2VEC_INSTALL_DIR} /word2vec.inference.model" )
11+
12+ set (IMG_CLS_RESNET_INSTALL_DIR
13+ "${INFERENCE_DEMO_INSTALL_DIR} /image_classification_resnet" )
14+
15+ if (NOT EXISTS
16+ ${IMG_CLS_RESNET_INSTALL_DIR} /image_classification_resnet.inference.model.tgz
17+ )
18+ inference_download_and_uncompress_without_verify(
19+ ${IMG_CLS_RESNET_INSTALL_DIR} ${INFERENCE_URL}
20+ "image_classification_resnet.inference.model.tgz" )
21+ endif ()
22+
23+ set (IMG_CLS_RESNET_MODEL_DIR
24+ "${IMG_CLS_RESNET_INSTALL_DIR} /image_classification_resnet.inference.model" )
25+
26+ if (WITH_ONNXRUNTIME)
27+ set (MOBILENETV2_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR} /MobileNetV2" )
28+ if (NOT EXISTS ${MOBILENETV2_INSTALL_DIR} /MobileNetV2.inference.model.tar.gz)
29+ inference_download_and_uncompress_without_verify(
30+ ${MOBILENETV2_INSTALL_DIR} ${INFERENCE_URL}
31+ "MobileNetV2.inference.model.tar.gz" )
32+ endif ()
33+ set (MOBILENETV2_MODEL_DIR "${MOBILENETV2_INSTALL_DIR} /MobileNetV2" )
34+ endif ()
Original file line number Diff line number Diff line change 1- if (ON_INFER)
2- include (../cpp/inference/test .cmake)
3- endif ()
1+ include (../cpp/inference/test .cmake)
42file (
53 GLOB TEST_OPS
64 RELATIVE "${CMAKE_CURRENT_SOURCE_DIR} "
You can’t perform that action at this time.
0 commit comments