diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2020-05-11 16:10:38 +0100 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2020-05-13 18:34:12 +0000 |
commit | c1f6b09cc22b6e2de3d9eb88aec1778d0308a2b3 (patch) | |
tree | 14a70415b6d17b42246798a293dfdd13cbe4c123 /src/backends/aclCommon | |
parent | 0c32ccfcd0b770cdd4eeb9d778b7f72a233e229a (diff) | |
download | armnn-c1f6b09cc22b6e2de3d9eb88aec1778d0308a2b3.tar.gz |
IVGCVSW-4753 Refactor CL Softmax workload generalizing for different datatype
* Change ComputeSoftmaxAclAxis to work with int and uint axis
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: Ibbfa9ec7e2f0416e6885673212a767419c871cca
Diffstat (limited to 'src/backends/aclCommon')
-rw-r--r-- | src/backends/aclCommon/ArmComputeUtils.hpp | 5 |
1 files changed, 3 insertions, 2 deletions
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<typename T> +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<T>(dim) - 1; } inline std::set<unsigned int> ComputeSplitAxis(const armnn::SplitterDescriptor& desc, const TensorShape& input) |