diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-07-03 18:17:28 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:15:39 +0100 |
commit | f0dea703ce3e2b465e79298bca95c4952a60f608 (patch) | |
tree | 487c9ab15ea8cef9d57aa3256599cde616310eeb /src/core/NEON/kernels/NEArithmeticSubtractionKernel.cpp | |
parent | 1dad50ea7b662e7c07a0a06bbbd175fd1bcf9bfc (diff) | |
download | ComputeLibrary-f0dea703ce3e2b465e79298bca95c4952a60f608.tar.gz |
COMPMID-417: Auto configuration for Add/Sub/Mul Neon/CL.
Change-Id: I3580de76bc53d342b53443d1077b1407d75a672a
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79570
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Michele DiGiorgio <michele.digiorgio@arm.com>
Reviewed-by: Moritz Pflanzer <moritz.pflanzer@arm.com>
Diffstat (limited to 'src/core/NEON/kernels/NEArithmeticSubtractionKernel.cpp')
-rw-r--r-- | src/core/NEON/kernels/NEArithmeticSubtractionKernel.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/core/NEON/kernels/NEArithmeticSubtractionKernel.cpp b/src/core/NEON/kernels/NEArithmeticSubtractionKernel.cpp index d3e62b069e..f51b6b9f0b 100644 --- a/src/core/NEON/kernels/NEArithmeticSubtractionKernel.cpp +++ b/src/core/NEON/kernels/NEArithmeticSubtractionKernel.cpp @@ -287,15 +287,18 @@ void NEArithmeticSubtractionKernel::configure(const ITensor *input1, const ITens { ARM_COMPUTE_ERROR_ON_NULLPTR(input1, input2, output); - set_shape_if_empty(*output->info(), input1->info()->tensor_shape()); - - if(input1->info()->data_type() == DataType::S16 || input2->info()->data_type() == DataType::S16) - { - set_format_if_unknown(*output->info(), Format::S16); - } - else if(input1->info()->data_type() == DataType::F32 || input2->info()->data_type() == DataType::F32) + // Auto initialize output if not initialized { - set_format_if_unknown(*output->info(), Format::F32); + set_shape_if_empty(*output->info(), input1->info()->tensor_shape()); + + if(input1->info()->data_type() == DataType::S16 || input2->info()->data_type() == DataType::S16) + { + set_format_if_unknown(*output->info(), Format::S16); + } + else if(input1->info()->data_type() == DataType::F32 || input2->info()->data_type() == DataType::F32) + { + set_format_if_unknown(*output->info(), Format::F32); + } } ARM_COMPUTE_ERROR_ON_MISMATCHING_SHAPES(input1, input2, output); |