diff options
author | Mike Kelly <mike.kelly@arm.com> | 2023-08-01 11:31:55 +0100 |
---|---|---|
committer | Jim Flynn <jim.flynn@arm.com> | 2023-08-01 21:00:44 +0000 |
commit | 460a179b53d5543d98d3e72c60458d4b0e3225a4 (patch) | |
tree | 98a2294193485e8d4455255c5825ebb324ffbb72 /shim | |
parent | 980446b2beefa0002814028980d83a48621685d3 (diff) | |
download | armnn-460a179b53d5543d98d3e72c60458d4b0e3225a4.tar.gz |
IVGCVSW-7899 Cannot handle tensors with more than 5 dimensions
* Fixed issue where then dimensions specificity didn't match the number
of dimensions.
Signed-off-by: Mike Kelly <mike.kelly@arm.com>
Change-Id: Ic4da6f23c1e8ca38f321aa88c69ef57558a8f393
Diffstat (limited to 'shim')
-rw-r--r-- | shim/sl/canonical/CanonicalUtils.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/shim/sl/canonical/CanonicalUtils.cpp b/shim/sl/canonical/CanonicalUtils.cpp index 622d4b111d..08a728c293 100644 --- a/shim/sl/canonical/CanonicalUtils.cpp +++ b/shim/sl/canonical/CanonicalUtils.cpp @@ -1,5 +1,5 @@ // -// Copyright © 2022 Arm Ltd and Contributors. All rights reserved. +// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved. // SPDX-License-Identifier: MIT // @@ -152,7 +152,7 @@ armnn::TensorInfo GetTensorInfoForOperand(const Operand& operand) } else { - bool dimensionsSpecificity[5] = { true, true, true, true, true }; + std::vector<unsigned char> dimensionsSpecificity(operand.dimensions.size(), true); int count = 0; std::for_each(operand.dimensions.data(), operand.dimensions.data() + operand.dimensions.size(), @@ -165,7 +165,9 @@ armnn::TensorInfo GetTensorInfoForOperand(const Operand& operand) count++; }); - TensorShape tensorShape(operand.dimensions.size(), operand.dimensions.data(), dimensionsSpecificity); + TensorShape tensorShape(operand.dimensions.size(), + operand.dimensions.data(), + reinterpret_cast<const bool *>(dimensionsSpecificity.data())); ret = TensorInfo(tensorShape, type); } } |