aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgios Pinitas <georgios.pinitas@arm.com>2019-05-15 13:24:00 +0100
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-05-15 16:12:35 +0100
commit1be8b82974da1090107d0318e846430a605b8b40 (patch)
tree0f76fa960dd29314e5ab27e1afb49d9be5f4a1b2
parentb3e72b6926d577215e3f8f6a3aef17919927f69a (diff)
downloadComputeLibrary-1be8b82974da1090107d0318e846430a605b8b40.tar.gz
COMPMID-2331: Fix FFTConvolutionLayer when no bias is used.
Change-Id: I33c53e97dc8c7f5ebc195055aba8310b384a79b2 Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Reviewed-on: https://review.mlplatform.org/c/1136 Reviewed-by: Michalis Spyrou <michalis.spyrou@arm.com> Comments-Addressed: Arm Jenkins <bsgcomp@arm.com> Reviewed-by: Giuseppe Rossini <giuseppe.rossini@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--src/runtime/CL/functions/CLFFTConvolutionLayer.cpp7
-rw-r--r--src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp7
2 files changed, 10 insertions, 4 deletions
diff --git a/src/runtime/CL/functions/CLFFTConvolutionLayer.cpp b/src/runtime/CL/functions/CLFFTConvolutionLayer.cpp
index 77097d2b6..afb1cab52 100644
--- a/src/runtime/CL/functions/CLFFTConvolutionLayer.cpp
+++ b/src/runtime/CL/functions/CLFFTConvolutionLayer.cpp
@@ -119,8 +119,11 @@ void CLFFTConvolutionLayer::configure(ICLTensor *input, const ICLTensor *weights
ICLTensor *output_to_use = _has_bias ? &_bias_output : output;
// Permute bias
- _permute_bias_func.configure(biases, &_permuted_bias, PermutationVector(1U, 2U, 0U));
- _permuted_bias.info()->set_data_layout(DataLayout::NCHW);
+ if(biases != nullptr)
+ {
+ _permute_bias_func.configure(biases, &_permuted_bias, PermutationVector(1U, 2U, 0U));
+ _permuted_bias.info()->set_data_layout(DataLayout::NCHW);
+ }
// Permute input if needed
_needs_permute = input->info()->data_layout() == DataLayout::NHWC;
diff --git a/src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp b/src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp
index 962402549..08230074c 100644
--- a/src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp
+++ b/src/runtime/NEON/functions/NEFFTConvolutionLayer.cpp
@@ -118,8 +118,11 @@ void NEFFTConvolutionLayer::configure(ITensor *input, const ITensor *weights, co
ITensor *output_to_use = _has_bias ? &_bias_output : output;
// Permute bias
- _permute_bias_func.configure(biases, &_permuted_bias, PermutationVector(1U, 2U, 0U));
- _permuted_bias.info()->set_data_layout(DataLayout::NCHW);
+ if(biases != nullptr)
+ {
+ _permute_bias_func.configure(biases, &_permuted_bias, PermutationVector(1U, 2U, 0U));
+ _permuted_bias.info()->set_data_layout(DataLayout::NCHW);
+ }
// Permute input if needed
_needs_permute = input->info()->data_layout() == DataLayout::NHWC;