aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColm Donelan <colm.donelan@arm.com>2023-07-20 10:08:03 +0100
committerTeresaARM <teresa.charlinreyes@arm.com>2023-07-20 14:05:31 +0000
commit47016c0c74fc97cf51f90555a11238332fe9406c (patch)
tree3f8984318e71b6d325cf7a4011bc5b6ea9621518
parent53d858b6a20590cf1e20aa5dbb5e63158985b9d0 (diff)
downloadarmnn-47016c0c74fc97cf51f90555a11238332fe9406c.tar.gz
IVGCVSW-7850 block non const bias on NEON Depthwise conv.
* There's currently a problem with using a non const bias value in NeonDepthwiseConvolution. We will block it for the moment. Signed-off-by: Colm Donelan <colm.donelan@arm.com> Change-Id: Ifd206cfd25a2305a80f8b0a88e07747e79468d18
-rw-r--r--src/backends/neon/workloads/NeonDepthwiseConvolutionWorkload.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backends/neon/workloads/NeonDepthwiseConvolutionWorkload.cpp b/src/backends/neon/workloads/NeonDepthwiseConvolutionWorkload.cpp
index ca8245cf4c..aa1fb563ff 100644
--- a/src/backends/neon/workloads/NeonDepthwiseConvolutionWorkload.cpp
+++ b/src/backends/neon/workloads/NeonDepthwiseConvolutionWorkload.cpp
@@ -62,6 +62,12 @@ arm_compute::Status NeonDepthwiseConvolutionWorkloadValidate(const TensorInfo& i
return arm_compute::Status{arm_compute::ErrorCode::RUNTIME_ERROR,
"ArmNN NeonDepthwiseConvolutionWorkload has empty bias value."};
}
+ // There's currently a problem with non const bias, so we'll explicitly block it here.
+ if (!biases.value().IsConstant())
+ {
+ return arm_compute::Status{arm_compute::ErrorCode::RUNTIME_ERROR,
+ "ArmNN NeonDepthwiseConvolutionWorkload does not support non constant bias."};
+ }
aclBiasesInfo = BuildArmComputeTensorInfo(biases.value(), descriptor.m_DataLayout);
aclBiasesInfo.set_are_values_constant(biases.value().IsConstant());
optionalAclBiasesInfo = &aclBiasesInfo;
@@ -98,6 +104,8 @@ NeonDepthwiseConvolutionWorkload::NeonDepthwiseConvolutionWorkload(
{
biasesPtr = &PolymorphicDowncast<IAclTensorHandle *>(m_Data.m_Inputs[2])->GetTensor();
biasesPtr->info()->set_are_values_constant(info.m_InputTensorInfos[2].IsConstant());
+ // We assume here that NeonDepthwiseConvolutionWorkloadValidate has been called before the constructor.
+ ARMNN_ASSERT(info.m_InputTensorInfos[2].IsConstant() == true);
}
arm_compute::TensorShape weightsShape = weights.info()->tensor_shape();