diff options
author | Colm Donelan <Colm.Donelan@arm.com> | 2021-03-30 15:30:13 +0100 |
---|---|---|
committer | Colm Donelan <Colm.Donelan@arm.com> | 2021-03-30 16:03:59 +0100 |
commit | ccfeb5ea9d3aa17f66c1c13f1682ac519c8973c0 (patch) | |
tree | 04435e8741fb356c60b5e02113aad23d99d2ef66 /ConversionUtils.cpp | |
parent | 2e4a24aafc622c00d14ad2dcc684d05dfaacfe33 (diff) | |
download | android-nn-driver-ccfeb5ea9d3aa17f66c1c13f1682ac519c8973c0.tar.gz |
IVGCVSW-5766 Avoiding driver abort when Cts tests use invalid filter shape.
* A number of DepthwiseConv2d Cts tests pass a filter operand with a
dimension[0] value greater than 1 in contravention of Android
documentation. Adding a check to handle this gracefully.
* Changing a hard assert in ConversionUtils::ConstTensorPin to a warning.
Signed-off-by: Colm Donelan <Colm.Donelan@arm.com>
Change-Id: I605340d098b717d1d88d259a0ed89a801287764d
Diffstat (limited to 'ConversionUtils.cpp')
-rw-r--r-- | ConversionUtils.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ConversionUtils.cpp b/ConversionUtils.cpp index b03ffbda..9cc6e286 100644 --- a/ConversionUtils.cpp +++ b/ConversionUtils.cpp @@ -62,7 +62,10 @@ ConstTensorPin::ConstTensorPin(const armnn::TensorInfo& tensorInfo, const armnn::PermutationVector& mappings) { armnn::IgnoreUnused(numBytes); - assert(tensorInfo.GetNumBytes() == numBytes); + if (tensorInfo.GetNumBytes() != numBytes) + { + ALOGW("The size of ConstTensor does not match its TensorInfo."); + } const bool needsSwizzling = (mappings.GetSize() > 0); if (needsSwizzling) |