aboutsummaryrefslogtreecommitdiff
path: root/src/backends/aclCommon/ArmComputeUtils.hpp
diff options
context:
space:
mode:
authorMike Kelly <mike.kelly@arm.com>2023-10-11 14:25:50 +0100
committermike.kelly <mike.kelly@arm.com>2023-10-12 11:57:55 +0000
commit363b572b61f7a32e92cde51478d7556ce43db56f (patch)
treec4f888c607acab8d8e683b77bb20f7c2e507c558 /src/backends/aclCommon/ArmComputeUtils.hpp
parentc4a932a5f2f8b5f8b684ed2034768136493fc64b (diff)
downloadarmnn-363b572b61f7a32e92cde51478d7556ce43db56f.tar.gz
Revert "Revert "MLCE-1093 Reshape and concat invalid results""
This reverts commit 008270f8c1359a7d62c2f881326b4d3f0d8b7b56. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: If8f5151aa349ff3834f03391e813669e5c51ed66
Diffstat (limited to 'src/backends/aclCommon/ArmComputeUtils.hpp')
-rw-r--r--src/backends/aclCommon/ArmComputeUtils.hpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/backends/aclCommon/ArmComputeUtils.hpp b/src/backends/aclCommon/ArmComputeUtils.hpp
index f466ab1777..5d424afa9a 100644
--- a/src/backends/aclCommon/ArmComputeUtils.hpp
+++ b/src/backends/aclCommon/ArmComputeUtils.hpp
@@ -9,6 +9,7 @@
#include <armnn/utility/Assert.hpp>
#include <armnn/utility/NumericCast.hpp>
#include <armnn/backends/WorkloadData.hpp>
+#include <armnnUtils/TensorUtils.hpp>
#include <arm_compute/runtime/FunctionDescriptors.h>
#include <arm_compute/function_info/FullyConnectedLayerInfo.h>
@@ -248,13 +249,20 @@ inline std::set<unsigned int> ComputeSplitAxis(const armnn::SplitterDescriptor&
unsigned int numDimensions = desc.GetNumDimensions();
std::set<unsigned int> splitAxis;
- for (unsigned int i = 0; i < numSplit; ++i)
+ if (desc.HasAxis())
{
- for (unsigned int dimIdx = 0; dimIdx < numDimensions; ++dimIdx)
+ splitAxis.insert(armnnUtils::GetUnsignedAxis(desc.GetNumDimensions(), desc.GetAxis()));
+ }
+ else
+ {
+ for (unsigned int i = 0; i < numSplit; ++i)
{
- if (desc.GetViewSizes(i)[dimIdx] != input[dimIdx])
+ for (unsigned int dimIdx = 0; dimIdx < numDimensions; ++dimIdx)
{
- splitAxis.insert(dimIdx);
+ if (desc.GetViewSizes(i)[dimIdx] != input[dimIdx])
+ {
+ splitAxis.insert(dimIdx);
+ }
}
}
}