aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2018-04-24 15:14:12 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:49:54 +0000
commit82b51482479951cf133c223eb81aae291cb4d590 (patch)
treef7ce7b0f169755234f788d68e296a769230e9964 /src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp
parent35aa6a36e7ef9302efd554aac9b84153ad7c6a9e (diff)
downloadComputeLibrary-82b51482479951cf133c223eb81aae291cb4d590.tar.gz
COMPMID-959: Sets memory manager to CLWinograd
-Sets memory manager to Winograd functions -Marks CLGEMM inputs as unused if needed Change-Id: I425a3f864c756e0e2b4da895e1730b8822149ba8 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/128891 Tested-by: Jenkins <bsgcomp@arm.com> Reviewed-by: Gian Marco Iodice <gianmarco.iodice@arm.com> Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp')
-rw-r--r--src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp b/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp
index 084c4df718..87c4a306aa 100644
--- a/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp
+++ b/src/runtime/CL/functions/CLGEMMConvolutionLayer.cpp
@@ -374,7 +374,6 @@ void CLGEMMConvolutionLayer::run()
ARM_COMPUTE_ERROR_ON(!_original_weights->is_used());
_reshape_weights.run();
- _is_first_run = false;
// Mark original weights tensor as unused
_original_weights->mark_as_unused();
@@ -398,6 +397,13 @@ void CLGEMMConvolutionLayer::run()
{
// Run gemm
_mm_gemm.run();
+
+ // Release reshaped weights if marked unused by CLGEMM
+ if(_is_first_run && !_weights_reshaped.is_used())
+ {
+ CLScheduler::get().queue().finish();
+ _weights_reshaped.allocator()->free();
+ }
}
// Reshape output matrix
@@ -410,4 +416,6 @@ void CLGEMMConvolutionLayer::run()
}
_memory_group.release();
+
+ _is_first_run = false;
}