diff --git a/paddle/fluid/inference/tests/book/test_inference_nlp.cc b/paddle/fluid/inference/tests/book/test_inference_nlp.cc index 5ece6084df272a0db8fc54f6da5206e46e83a821..c3bec27925280af0121eea281f2ad7f1c6d5c2d0 100644 --- a/paddle/fluid/inference/tests/book/test_inference_nlp.cc +++ b/paddle/fluid/inference/tests/book/test_inference_nlp.cc @@ -185,12 +185,12 @@ TEST(inference, nlp) { std::vector> jobs; SplitData(datasets, &jobs, FLAGS_num_threads); std::vector> threads; + start_ms = GetCurrentMs(); for (int i = 0; i < FLAGS_num_threads; ++i) { threads.emplace_back( new std::thread(ThreadRunInfer, i, &executor, scope.get(), std::ref(inference_program), std::ref(jobs))); } - start_ms = GetCurrentMs(); for (int i = 0; i < FLAGS_num_threads; ++i) { threads[i]->join(); }