From 1b52f221e020181eeb9928e4aeae59b5ec272854 Mon Sep 17 00:00:00 2001 From: wenbin Date: Thu, 3 Jun 2021 02:55:45 +0000 Subject: [PATCH] UT correct --- paddle/fluid/inference/api/analysis_predictor.cc | 4 ++-- .../fluid/tests/unittests/ir/inference/test_trt_conv_pass.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/inference/api/analysis_predictor.cc b/paddle/fluid/inference/api/analysis_predictor.cc index fecdc6846a3ce..6ce9d2030fa6b 100644 --- a/paddle/fluid/inference/api/analysis_predictor.cc +++ b/paddle/fluid/inference/api/analysis_predictor.cc @@ -271,7 +271,7 @@ bool AnalysisPredictor::CreateExecutor() { return true; } -static bool IsPrePareDataOptTargetOp(framework::OpDesc *op) { +static bool IsPrepareDataOptTargetOp(framework::OpDesc *op) { // here is prepare data optimization related bad cases: // let's assume an op behind conditional_block and if conditional_block // chooses branch 1, the op need to call prepare data. else the op don't need @@ -299,7 +299,7 @@ static void DisablePrepareDataOpt( int blockID = op->GetBlockAttrId("sub_block"); DisablePrepareDataOpt(inference_program, blockID); } - if (IsPrePareDataOptTargetOp(op)) { + if (IsPrepareDataOptTargetOp(op)) { disable_opt = true; } } diff --git a/python/paddle/fluid/tests/unittests/ir/inference/test_trt_conv_pass.py b/python/paddle/fluid/tests/unittests/ir/inference/test_trt_conv_pass.py index 7f613c4765963..adbb89523aacb 100644 --- a/python/paddle/fluid/tests/unittests/ir/inference/test_trt_conv_pass.py +++ b/python/paddle/fluid/tests/unittests/ir/inference/test_trt_conv_pass.py @@ -195,7 +195,7 @@ def setUp(self): }, { "conv2d_0.tmp_0": [16, 6, 16, 16], "data": [16, 6, 16, 16], - "depthwise_conv2d_0.tmp_0": [32, 6, 64, 64] + "depthwise_conv2d_0.tmp_0": [16, 6, 16, 16] }, False) self.fetch_list = [conv_out]