From d9cdf1402fb7e1231f56c1d5549639b423e4e323 Mon Sep 17 00:00:00 2001 From: Michele Di Giorgio Date: Fri, 2 Jul 2021 15:17:08 +0100 Subject: Port NEFullyConnectedLayer to memory injecting interface Resolves: COMPMID-4501 Change-Id: Ib61b3d06974009e501b3fb86467735427e13a94a Signed-off-by: Michele Di Giorgio Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/5931 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp') diff --git a/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp b/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp index c405786c80..f63fcb02fd 100644 --- a/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp +++ b/src/runtime/NEON/functions/NEGEMMConvolutionLayer.cpp @@ -105,19 +105,9 @@ void NEGEMMConvolutionLayer::prepare() { _impl->weights->mark_as_unused(); } - for(auto &ws : _impl->workspace_tensors) - { - const int slot = ws.slot; - for(auto &m : _impl->aux_mem_req) - { - if(m.slot == slot && m.lifetime == MemoryLifetime::Prepare) - { - auto tensor = ws.tensor.get(); - tensor->allocator()->free(); - break; - } - } - } + + // Release temporary tensors that are only used in prepare stage + release_temporaries(_impl->aux_mem_req, _impl->workspace_tensors); _impl->is_prepared = true; } } -- cgit v1.2.1