|
|
|
@ -271,10 +271,11 @@ TEST(Analyzer_rnn1, multi_thread) {
|
|
|
|
|
|
|
|
|
|
std::vector<std::vector<PaddleTensor>> input_slots_all;
|
|
|
|
|
SetInput(&input_slots_all);
|
|
|
|
|
TestPrediction(cfg, input_slots_all, &outputs, FLAGS_num_threads);
|
|
|
|
|
TestPrediction(cfg, input_slots_all, &outputs, 4 /* multi_thread */);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool CompareTensors(framework::Scope &a_scope, framework::Scope &b_scope,
|
|
|
|
|
bool CompareTensors(const framework::Scope &a_scope,
|
|
|
|
|
const framework::Scope &b_scope,
|
|
|
|
|
const std::vector<std::string> &tensors) {
|
|
|
|
|
for (auto &x : tensors) {
|
|
|
|
|
auto *a_var = a_scope.FindVar(x);
|
|
|
|
|