| 724 | } |
| 725 | |
| 726 | TfLiteStatus Subgraph::PrepareOpsAndTensors() { |
| 727 | if (!memory_planner_) { |
| 728 | memory_planner_.reset(new ArenaPlanner( |
| 729 | &context_, std::unique_ptr<GraphInfo>(new InterpreterInfo(this)), |
| 730 | /*preserve_inputs=*/true, /*preserve_intermediates*/ false)); |
| 731 | memory_planner_->PlanAllocations(); |
| 732 | } |
| 733 | |
| 734 | int last_exec_plan_index_prepared = 0; |
| 735 | |
| 736 | TF_LITE_ENSURE_STATUS(PrepareOpsStartingAt( |
| 737 | next_execution_plan_index_to_prepare_, &last_exec_plan_index_prepared)); |
| 738 | next_execution_plan_index_to_prepare_ = last_exec_plan_index_prepared + 1; |
| 739 | |
| 740 | TF_LITE_ENSURE_STATUS(memory_planner_->ExecuteAllocations( |
| 741 | next_execution_plan_index_to_plan_allocation_, |
| 742 | last_exec_plan_index_prepared)); |
| 743 | next_execution_plan_index_to_plan_allocation_ = |
| 744 | last_exec_plan_index_prepared + 1; |
| 745 | |
| 746 | return kTfLiteOk; |
| 747 | } |
| 748 | |
| 749 | TfLiteStatus Subgraph::Invoke() { |
| 750 | if (!consistent_) { |
nothing calls this directly
no test coverage detected