From 741b1e93b011fb0a6a98d17022a30b803fbb8b6b Mon Sep 17 00:00:00 2001 From: paulinagacek Date: Thu, 22 Sep 2022 13:38:00 +0000 Subject: [PATCH] fc passes disabled when iterations=0 in gru test --- .../tests/api/analyzer_lexical_analysis_gru_tester.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/paddle/fluid/inference/tests/api/analyzer_lexical_analysis_gru_tester.cc b/paddle/fluid/inference/tests/api/analyzer_lexical_analysis_gru_tester.cc index 89bfc6812a451..165318ca60463 100644 --- a/paddle/fluid/inference/tests/api/analyzer_lexical_analysis_gru_tester.cc +++ b/paddle/fluid/inference/tests/api/analyzer_lexical_analysis_gru_tester.cc @@ -272,6 +272,9 @@ TEST(Analyzer_lexical_test, Analyzer_lexical_analysis) { analysis_cfg.mkldnn_quantizer_config()->SetWarmupBatchSize( FLAGS_batch_size); } + if (FLAGS_iterations == 0) { + analysis_cfg.DisableMkldnnFcPasses(); + } std::vector acc_analysis(3); acc_analysis = Lexical_Test(input_slots_all, &outputs, &analysis_cfg, true); for (size_t i = 0; i < acc_analysis.size(); i++) {