aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/NEON/functions/NEDirectConvolutionLayer.cpp
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2017-09-21 13:30:40 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit6a3e976d71ecca2e6fdb604618fd94969eff9861 (patch)
treec9ce35c95fdea21011f8e99829f6f0875bada8fe /src/runtime/NEON/functions/NEDirectConvolutionLayer.cpp
parentd9e5b19c87906390ed87efdada3b096a62888bf4 (diff)
downloadComputeLibrary-6a3e976d71ecca2e6fdb604618fd94969eff9861.tar.gz
COMPMID-417: Fix memory manager in NEDirectConvolution.
Moves the accumulator manage call to the cases that is actually used. Change-Id: I80486913142860b394aad9d4b486166a2dfaf269 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88620 Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com> Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Diffstat (limited to 'src/runtime/NEON/functions/NEDirectConvolutionLayer.cpp')
-rw-r--r--src/runtime/NEON/functions/NEDirectConvolutionLayer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/runtime/NEON/functions/NEDirectConvolutionLayer.cpp b/src/runtime/NEON/functions/NEDirectConvolutionLayer.cpp
index a56a73c44a..b831a6a7be 100644
--- a/src/runtime/NEON/functions/NEDirectConvolutionLayer.cpp
+++ b/src/runtime/NEON/functions/NEDirectConvolutionLayer.cpp
@@ -46,15 +46,13 @@ void NEDirectConvolutionLayer::configure(ITensor *input, const ITensor *weights,
_accumulator.allocator()->free();
}
- // Manage intermediate buffers
- _memory_group.manage(&_accumulator);
-
// Allocate the intermediate accumulator tensor in case of fixed point input
switch(output->info()->data_type())
{
case DataType::QS8:
{
_accumulator.allocator()->init(TensorInfo(output->info()->tensor_shape(), 1, DataType::QS16, output->info()->fixed_point_position()));
+ _memory_group.manage(&_accumulator);
_conv_kernel.configure(input, weights, &_accumulator, conv_info);
_accumulate_bias_kernel.configure(&_accumulator, bias, output);
_accumulator.allocator()->allocate();
@@ -63,6 +61,7 @@ void NEDirectConvolutionLayer::configure(ITensor *input, const ITensor *weights,
case DataType::QS16:
{
_accumulator.allocator()->init(TensorInfo(output->info()->tensor_shape(), 1, DataType::QS32, output->info()->fixed_point_position()));
+ _memory_group.manage(&_accumulator);
_conv_kernel.configure(input, weights, &_accumulator, conv_info);
_accumulate_bias_kernel.configure(&_accumulator, bias, output);
_accumulator.allocator()->allocate();