| 523 | } |
| 524 | |
| 525 | bool GraphExecutor::Prerun(void) |
| 526 | { |
| 527 | graph_->SanitizeGraph(); |
| 528 | |
| 529 | SetExecParam(graph_); |
| 530 | |
| 531 | int optimize_only = 0; |
| 532 | |
| 533 | GetGraphAttr("optimize_only", &optimize_only, sizeof(int)); |
| 534 | |
| 535 | if(optimize_only) |
| 536 | { |
| 537 | if(exec_engine_->Prerun(exec_handle_)) |
| 538 | return true; |
| 539 | else |
| 540 | return false; |
| 541 | } |
| 542 | |
| 543 | if(InferShape() && exec_engine_->Prerun(exec_handle_)) |
| 544 | { |
| 545 | prerun_done_ = true; |
| 546 | return true; |
| 547 | } |
| 548 | |
| 549 | return false; |
| 550 | } |
| 551 | |
| 552 | bool GraphExecutor::Postrun(void) |
| 553 | { |
no test coverage detected