diff options
author | Colm Donelan <colm.donelan@arm.com> | 2024-02-01 15:00:43 +0000 |
---|---|---|
committer | Colm Donelan <colm.donelan@arm.com> | 2024-02-21 09:36:37 +0000 |
commit | b4ef16334900af33bf4321f28c90f62bf32238cd (patch) | |
tree | 0d8299e44df109d95ce21bf56b9441019e6c7403 /src/backends/tosaCommon | |
parent | 04a0da655f89e1c024cf16f31ab30176364c9362 (diff) | |
download | armnn-b4ef16334900af33bf4321f28c90f62bf32238cd.tar.gz |
IVGCVSW-7854 Remove/rewrite asserts in the backends.
* Identify usages of ARMNN_ASSERT that should be proper exceptions.
* Change ARMNN_ASSERT in Doctests to CHECK.
* Verify any remaining assertions are reasonable.
Signed-off-by: Colm Donelan <colm.donelan@arm.com>
Change-Id: Ifd1f2a5a4bb60135e8654305035ec70e09c4dc2d
Diffstat (limited to 'src/backends/tosaCommon')
-rw-r--r-- | src/backends/tosaCommon/operatorMappings/ElementwiseBinaryOperator.cpp | 3 | ||||
-rw-r--r-- | src/backends/tosaCommon/operatorMappings/ElementwiseUnaryOperator.cpp | 4 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/backends/tosaCommon/operatorMappings/ElementwiseBinaryOperator.cpp b/src/backends/tosaCommon/operatorMappings/ElementwiseBinaryOperator.cpp index 6c2b31437b..a9af249673 100644 --- a/src/backends/tosaCommon/operatorMappings/ElementwiseBinaryOperator.cpp +++ b/src/backends/tosaCommon/operatorMappings/ElementwiseBinaryOperator.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2022-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -88,7 +88,6 @@ TosaSerializationBasicBlock* ConvertElementwiseBinaryToTosaOperator(const Layer* default: throw armnn::Exception("ConvertElementwiseBinaryToTosaOperator: Unsupported layer type."); } - ARMNN_ASSERT(op != nullptr); std::vector<TosaSerializationTensor*> tensors; // Only add input tensors if connected layer is an input layer. diff --git a/src/backends/tosaCommon/operatorMappings/ElementwiseUnaryOperator.cpp b/src/backends/tosaCommon/operatorMappings/ElementwiseUnaryOperator.cpp index 17ea64b984..02dddab8bc 100644 --- a/src/backends/tosaCommon/operatorMappings/ElementwiseUnaryOperator.cpp +++ b/src/backends/tosaCommon/operatorMappings/ElementwiseUnaryOperator.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2023 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2023-2024 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -44,8 +44,6 @@ TosaSerializationBasicBlock* ConvertElementwiseUnaryOperator(const Layer* layer, throw armnn::Exception("ConvertElementwiseUnaryToTosaOperator: Unsupported layer type."); } - ARMNN_ASSERT(op != nullptr); - std::vector<TosaSerializationTensor*> tensors; // Only add input tensor if connected layer is an input layer. // As intermediate or constant tensors will be created separately. |