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

Method ~Subgraph

tensorflow/lite/core/subgraph.cc:187–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187Subgraph::~Subgraph() {
188 for (int node_index = 0; node_index < nodes_and_registration_.size();
189 ++node_index) {
190 CleanupNode(node_index);
191 }
192
193 for (size_t i = 0; i < context_.tensors_size; i++) {
194 TfLiteTensor* tensor = &context_.tensors[i];
195 if (tensor->buffer_handle != kTfLiteNullBufferHandle &&
196 tensor->delegate->FreeBufferHandle != nullptr) {
197 tensor->delegate->FreeBufferHandle(&context_, tensor->delegate,
198 &tensor->buffer_handle);
199 }
200 TfLiteTensorFree(tensor);
201 }
202}
203
204void Subgraph::CleanupNode(int node_index) {
205 TfLiteNode& node = nodes_and_registration_[node_index].first;

Callers

nothing calls this directly

Calls 2

TfLiteTensorFreeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected