File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed
paddle/fluid/inference/tests/api Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -100,14 +100,14 @@ set(OCR_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR}/ocr")
100
100
if (NOT EXISTS ${OCR_INSTALL_DIR} )
101
101
inference_download_and_uncompress (${OCR_INSTALL_DIR} "http://paddlemodels.cdn.bcebos.com/" "inference-vis-demos%2Focr.tar.gz" )
102
102
endif ()
103
- inference_analysis_api_test_with_refer_result (test_analyzer_ocr ${OCR_INSTALL_DIR} analyzer_vis_tester.cc )
103
+ inference_analysis_api_test_with_refer_result (test_analyzer_ocr ${OCR_INSTALL_DIR} analyzer_vis_tester.cc SERIAL )
104
104
105
105
# mobilenet with transpose op
106
106
set (MOBILENET_INSTALL_DIR "${INFERENCE_DEMO_INSTALL_DIR} /mobilenet" )
107
107
if (NOT EXISTS ${MOBILENET_INSTALL_DIR} )
108
108
inference_download_and_uncompress (${MOBILENET_INSTALL_DIR} "http://paddlemodels.cdn.bcebos.com/" "inference-vis-demos%2Fmobilenet.tar.gz" )
109
109
endif ()
110
- inference_analysis_api_test_with_refer_result (test_analyzer_mobilenet_transpose ${MOBILENET_INSTALL_DIR} analyzer_vis_tester.cc )
110
+ inference_analysis_api_test_with_refer_result (test_analyzer_mobilenet_transpose ${MOBILENET_INSTALL_DIR} analyzer_vis_tester.cc SERIAL )
111
111
112
112
# resnet50
113
113
inference_analysis_api_test_with_fake_data (test_analyzer_resnet50
Original file line number Diff line number Diff line change @@ -313,13 +313,12 @@ void CompareDeterministic(
313
313
int num_times = FLAGS_repeat;
314
314
auto predictor = CreateTestPredictor (config, FLAGS_use_analysis);
315
315
316
- // warmup run
317
316
std::vector<PaddleTensor> warmup_outputs, outputs;
318
- predictor->Run (inputs[0 ], &warmup_outputs, batch_size);
319
-
320
317
// run num_times to Compare Deterministic Result.
321
- for (int i = 0 ; i < num_times; i++) {
322
- for (size_t j = 0 ; j < inputs.size (); j++) {
318
+ for (size_t j = 0 ; j < inputs.size (); j++) {
319
+ // warmup run
320
+ predictor->Run (inputs[j], &warmup_outputs, batch_size);
321
+ for (int i = 0 ; i < num_times; i++) {
323
322
predictor->Run (inputs[j], &outputs, batch_size);
324
323
CompareResult (outputs, warmup_outputs);
325
324
}
You can’t perform that action at this time.
0 commit comments