follow comment: refine where time started

wangkuiyi-patch-1
tensor-tang 7 years ago
parent 38f8182df6
commit 99d00cce93

@ -185,12 +185,12 @@ TEST(inference, nlp) {
std::vector<std::vector<const paddle::framework::LoDTensor*>> jobs;
SplitData(datasets, &jobs, FLAGS_num_threads);
std::vector<std::unique_ptr<std::thread>> 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();
}

Loading…
Cancel
Save