diff --git a/paddle/fluid/framework/ir/seqpool_concat_fuse_pass.cc b/paddle/fluid/framework/ir/seqpool_concat_fuse_pass.cc index 96a3b7ee058647156258b946c1301138c185fa31..fa75e3b4aa7feb7ff856dc26338d089f90efa2e2 100644 --- a/paddle/fluid/framework/ir/seqpool_concat_fuse_pass.cc +++ b/paddle/fluid/framework/ir/seqpool_concat_fuse_pass.cc @@ -50,7 +50,7 @@ PDNode* BuildSeqPoolConcatPattern(PDPattern* pattern, // the other one should be unused empty var. if (is_nth_input_var_of_concat(x->outputs[0], idx)) { satisfied_all = satisfied_all && x->outputs[1]->IsVar() && - x->outputs[1]->outputs.size() == 0; + x->outputs[1]->outputs.empty(); } else { satisfied_all = satisfied_all && is_nth_input_var_of_concat(x->outputs[1], idx) && diff --git a/paddle/fluid/operators/jit/benchmark.cc b/paddle/fluid/operators/jit/benchmark.cc index bde2791add4075be6949703dfbea634966d25c1c..4b4ce07fa78b97e636173566fa104cb8a18c914e 100644 --- a/paddle/fluid/operators/jit/benchmark.cc +++ b/paddle/fluid/operators/jit/benchmark.cc @@ -52,11 +52,11 @@ struct BenchFunc { for (int i = 0; i < FLAGS_burning; ++i) { tgt(args...); } - auto start = paddle::platform::PosixInNsec() / 1e-3; + auto start = paddle::platform::PosixInNsec() * 1e-3; for (int i = 0; i < FLAGS_repeat; ++i) { tgt(args...); } - auto end = paddle::platform::PosixInNsec() / 1e-3; + auto end = paddle::platform::PosixInNsec() * 1e-3; return static_cast(end - start) / FLAGS_repeat; } };