| 1157 | } |
| 1158 | |
| 1159 | TfLiteStatus Subgraph::EnsureMemoryAllocations() { |
| 1160 | if (memory_planner_) { |
| 1161 | state_ = kStateUninvokable; |
| 1162 | TF_LITE_ENSURE_OK(&context_, memory_planner_->PlanAllocations()); |
| 1163 | } |
| 1164 | TF_LITE_ENSURE_OK(&context_, AllocateTensors()); |
| 1165 | TF_LITE_ENSURE_EQ(&context_, state_, kStateInvokable); |
| 1166 | return kTfLiteOk; |
| 1167 | } |
| 1168 | |
| 1169 | TfLiteStatus Subgraph::ModifyGraphWithDelegate(TfLiteDelegate* delegate) { |
| 1170 | // Restore delegation state if applicable. |
no test coverage detected