aboutsummaryrefslogtreecommitdiff
path: root/src/graph2/detail/ExecutionHelpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph2/detail/ExecutionHelpers.cpp')
-rw-r--r--src/graph2/detail/ExecutionHelpers.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/graph2/detail/ExecutionHelpers.cpp b/src/graph2/detail/ExecutionHelpers.cpp
index ae214ad5a6..3688d0b0dc 100644
--- a/src/graph2/detail/ExecutionHelpers.cpp
+++ b/src/graph2/detail/ExecutionHelpers.cpp
@@ -135,6 +135,17 @@ ExecutionWorkload configure_all_nodes(Graph &g, GraphContext &ctx)
return workload;
}
+void release_unused_tensors(Graph &g)
+{
+ for(auto &tensor : g.tensors())
+ {
+ if(tensor != nullptr && tensor->handle() != nullptr)
+ {
+ tensor->handle()->release_if_unused();
+ }
+ }
+}
+
void call_tensor_accessor(Tensor *tensor)
{
ARM_COMPUTE_ERROR_ON(!tensor);