From c3a9f3c4b2c3465f8779cbed4ec8f86479647bde Mon Sep 17 00:00:00 2001 From: tensor-tang Date: Thu, 10 Jan 2019 14:06:35 +0000 Subject: [PATCH] fix typo and refine test=develop --- paddle/fluid/framework/ir/seqpool_concat_fuse_pass.cc | 2 +- paddle/fluid/operators/jit/benchmark.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/framework/ir/seqpool_concat_fuse_pass.cc b/paddle/fluid/framework/ir/seqpool_concat_fuse_pass.cc index 96a3b7ee05..fa75e3b4aa 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 bde2791add..4b4ce07fa7 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; } }; -- GitLab