From 82b51482479951cf133c223eb81aae291cb4d590 Mon Sep 17 00:00:00 2001 From: Georgios Pinitas Date: Tue, 24 Apr 2018 15:14:12 +0100 Subject: 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 Reviewed-by: Gian Marco Iodice Reviewed-by: Anthony Barbier --- src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp') diff --git a/src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp b/src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp index 86ccddac88..65747cf5d7 100644 --- a/src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp +++ b/src/runtime/CL/functions/CLWinogradConvolutionLayer.cpp @@ -151,8 +151,6 @@ void CLWinogradConvolutionLayer::run() { // Run filter transform CLScheduler::get().enqueue(_filter_transform, false); - - _is_first_run = false; } _memory_group.acquire(); @@ -163,6 +161,13 @@ void CLWinogradConvolutionLayer::run() // Run batched matrix multiplication _batched_mm.run(); + // Release reshaped weights if marked unused by CLGEMM + if(_is_first_run && !_input1.is_used()) + { + CLScheduler::get().queue().finish(); + _input1.allocator()->free(); + } + // Run output transform CLScheduler::get().enqueue(_output_transform); @@ -172,4 +177,6 @@ void CLWinogradConvolutionLayer::run() } _memory_group.release(); + + _is_first_run = false; } -- cgit v1.2.1