| 51 | } |
| 52 | |
| 53 | TfLiteStatus ArenaPlanner::ResetAllocations() { |
| 54 | TF_LITE_ENSURE_STATUS(arena_.Clear()); |
| 55 | TF_LITE_ENSURE_STATUS(persistent_arena_.Clear()); |
| 56 | allocs_.clear(); |
| 57 | allocs_.resize(graph_info_->num_tensors()); |
| 58 | // Note that we only clear the alloc_queue_ when re-planning allocations, as |
| 59 | // it should only change when the graph topology itself changes. |
| 60 | return kTfLiteOk; |
| 61 | } |
| 62 | |
| 63 | TfLiteStatus ArenaPlanner::PlanAllocations() { |
| 64 | // Invalidate any existing data. |