From c1f6b09cc22b6e2de3d9eb88aec1778d0308a2b3 Mon Sep 17 00:00:00 2001 From: Teresa Charlin Date: Mon, 11 May 2020 16:10:38 +0100 Subject: IVGCVSW-4753 Refactor CL Softmax workload generalizing for different datatype * Change ComputeSoftmaxAclAxis to work with int and uint axis Signed-off-by: Teresa Charlin Change-Id: Ibbfa9ec7e2f0416e6885673212a767419c871cca --- src/backends/aclCommon/ArmComputeUtils.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/backends/aclCommon/ArmComputeUtils.hpp') diff --git a/src/backends/aclCommon/ArmComputeUtils.hpp b/src/backends/aclCommon/ArmComputeUtils.hpp index 80bb7623e8..d8818ce209 100644 --- a/src/backends/aclCommon/ArmComputeUtils.hpp +++ b/src/backends/aclCommon/ArmComputeUtils.hpp @@ -150,7 +150,8 @@ inline arm_compute::InterpolationPolicy ConvertResizeMethodToAclInterpolationPol } } -inline unsigned int ComputeSoftmaxAclAxis(const SoftmaxDescriptor& softmaxDesc, const armnn::TensorInfo& tensor) +template +inline T ComputeSoftmaxAclAxis(const SoftmaxDescriptor& softmaxDesc, const armnn::TensorInfo& tensor) { // Detect the Android default value of -1 and return the ACL default value of 1. if (softmaxDesc.m_Axis == -1) @@ -163,7 +164,7 @@ inline unsigned int ComputeSoftmaxAclAxis(const SoftmaxDescriptor& softmaxDesc, ARMNN_ASSERT(dim != 0); // Currently ArmNN support axis 1. - return dim - 1; + return static_cast(dim) - 1; } inline std::set ComputeSplitAxis(const armnn::SplitterDescriptor& desc, const TensorShape& input) -- cgit v1.2.1