Skip to content

Commit f507e5c

Browse files
committed
update multi-threads UT
1 parent 37d1a66 commit f507e5c

File tree

2 files changed

+8
-12
lines changed

2 files changed

+8
-12
lines changed

paddle/fluid/inference/analysis/analyzer.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
#include "paddle/fluid/inference/analysis/analyzer.h"
1616
#include <string>
17+
#include <vector>
1718
#include "paddle/fluid/inference/analysis/data_flow_graph_to_fluid_pass.h"
1819
#include "paddle/fluid/inference/analysis/dfg_graphviz_draw_pass.h"
1920
#include "paddle/fluid/inference/analysis/fluid_to_data_flow_graph_pass.h"
@@ -41,7 +42,7 @@ class DfgPassManagerImpl final : public DfgPassManager {
4142
public:
4243
DfgPassManagerImpl() {
4344
// TODO(Superjomn) set the key with pass reprs.
44-
LOG(INFO)
45+
VLOG(3)
4546
<< "-----------------------------------------------------------------";
4647
if (FLAGS_IA_enable_ir) {
4748
AddPass("fluid-to-ir-pass", new FluidToIrPass);
@@ -53,7 +54,7 @@ class DfgPassManagerImpl final : public DfgPassManager {
5354
if (!FLAGS_IA_output_storage_path.empty()) {
5455
AddPass("model-store-pass", new ModelStorePass);
5556
}
56-
LOG(INFO)
57+
VLOG(3)
5758
<< "-----------------------------------------------------------------";
5859
}
5960

@@ -112,7 +113,6 @@ void Analyzer::Run(Argument* argument) {
112113
"mul_lstm_fuse_pass", "graph_viz_pass", //
113114
"seq_concat_fc_fuse_pass", "graph_viz_pass", //
114115
"fc_fuse_pass", "graph_viz_pass" //
115-
116116
}));
117117

118118
for (auto& x : data_) {

paddle/fluid/inference/analysis/analyzer_tester.cc

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -335,18 +335,14 @@ void TestDituRNNPrediction(bool use_analysis_and_activate_ir = false,
335335
}
336336
}
337337

338-
// Directly infer with the original model.
339-
TEST(Analyzer, DituRNN_without_analysis) {
340-
LOG(INFO) << "ditu rnn without analysis";
338+
TEST(Analyzer, DituRNN) {
341339
TestDituRNNPrediction(false, 1);
342-
TestDituRNNPrediction(false, 4); // multi-threads
340+
TestDituRNNPrediction(true, 1);
343341
}
344342

345-
// Inference with analysis and IR. The IR module will fuse some large kernels.
346-
TEST(Analyzer, DituRNN_with_analysis_with_IR) {
347-
LOG(INFO) << "ditu rnn with analysis and IR fuse";
348-
TestDituRNNPrediction(true, 1);
349-
TestDituRNNPrediction(true, 4); // multi-threads
343+
TEST(Analyzer, DituRNN_multi_thread) {
344+
TestDituRNNPrediction(false, 4);
345+
TestDituRNNPrediction(true, 4);
350346
}
351347

352348
} // namespace analysis

0 commit comments

Comments
 (0)