diff --git a/test/executor_for_test.h b/test/executor_for_test.h index 93847af20a6d48a6df33dc50f6c6a1db76facf51..60f1856bb9294c6f9b4bd5cfb7d44f984c6f0794 100644 --- a/test/executor_for_test.h +++ b/test/executor_for_test.h @@ -43,7 +43,7 @@ template class Executor4Test : public Executor { public: Executor4Test(Program p, string op_type, - bool use_optimize = false, int predict_op_count = 1) + bool use_optimize = false) : Executor() { this->use_optimize_ = use_optimize; this->program_ = p; @@ -64,7 +64,7 @@ class Executor4Test : public Executor { std::vector> ops = block_desc->Ops(); for (int i = 0; i < ops.size(); ++i) { auto op = ops[i]; - if (op->Type() == op_type && i < predict_op_count) { + if (op->Type() == op_type) { DLOG << "匹配到: " << op->Type(); /// test first meeting op in program @@ -74,6 +74,7 @@ class Executor4Test : public Executor { op->Type(), op->GetInputs(), op->GetOutputs(), op->GetAttrMap(), this->program_.scope); this->ops_of_block_[*block_desc.get()].push_back(op_ptr); + break; } } }