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

Function DeleteArrayIfUnused

tensorflow/lite/toco/tooling_util.cc:158–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158bool DeleteArrayIfUnused(const string& array_name, Model* model) {
159 if (IsDiscardableArray(*model, array_name) &&
160 CountOpsWithInput(*model, array_name) == 0 &&
161 GetOpWithOutput(*model, array_name) == nullptr) {
162 model->EraseArray(array_name);
163 return true;
164 }
165 return false;
166}
167
168bool DeleteArrayIfUnusedOutsideOfOp(const string& array_name,
169 const Operator* op, Model* model) {

Callers 4

RunMethod · 0.85
RunMethod · 0.85
RerouteFunction · 0.85

Calls 4

IsDiscardableArrayFunction · 0.85
CountOpsWithInputFunction · 0.85
GetOpWithOutputFunction · 0.85
EraseArrayMethod · 0.80

Tested by

no test coverage detected