MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / PrepareOpsAndTensors

Method PrepareOpsAndTensors

tensorflow/lite/core/subgraph.cc:726–747  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

724}
725
726TfLiteStatus 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
749TfLiteStatus Subgraph::Invoke() {
750 if (!consistent_) {

Callers

nothing calls this directly

Calls 3

PlanAllocationsMethod · 0.80
ExecuteAllocationsMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected