fix typo and refine

test=develop
revert-15207-remove_op_handle_lock_and_fix_var
tensor-tang 6 years ago
parent 146e942c65
commit c3a9f3c4b2

@ -50,7 +50,7 @@ PDNode* BuildSeqPoolConcatPattern(PDPattern* pattern,
// the other one should be unused empty var. // the other one should be unused empty var.
if (is_nth_input_var_of_concat(x->outputs[0], idx)) { if (is_nth_input_var_of_concat(x->outputs[0], idx)) {
satisfied_all = satisfied_all && x->outputs[1]->IsVar() && satisfied_all = satisfied_all && x->outputs[1]->IsVar() &&
x->outputs[1]->outputs.size() == 0; x->outputs[1]->outputs.empty();
} else { } else {
satisfied_all = satisfied_all =
satisfied_all && is_nth_input_var_of_concat(x->outputs[1], idx) && satisfied_all && is_nth_input_var_of_concat(x->outputs[1], idx) &&

@ -52,11 +52,11 @@ struct BenchFunc {
for (int i = 0; i < FLAGS_burning; ++i) { for (int i = 0; i < FLAGS_burning; ++i) {
tgt(args...); tgt(args...);
} }
auto start = paddle::platform::PosixInNsec() / 1e-3; auto start = paddle::platform::PosixInNsec() * 1e-3;
for (int i = 0; i < FLAGS_repeat; ++i) { for (int i = 0; i < FLAGS_repeat; ++i) {
tgt(args...); tgt(args...);
} }
auto end = paddle::platform::PosixInNsec() / 1e-3; auto end = paddle::platform::PosixInNsec() * 1e-3;
return static_cast<double>(end - start) / FLAGS_repeat; return static_cast<double>(end - start) / FLAGS_repeat;
} }
}; };

Loading…
Cancel
Save