diff options
author | Francis Murtagh <francis.murtagh@arm.com> | 2019-07-26 15:44:17 +0100 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2019-07-26 15:44:17 +0100 |
commit | 3b9383548309a8f9121668826a628ec250c57a1c (patch) | |
tree | 01cc4e162008aea23bfe9ae167ded0e8f9abc39c /src/backends/cl/ClLayerSupport.cpp | |
parent | 82b15eda6f87a20bc31256f5e85eb4082d3d0591 (diff) | |
download | armnn-3b9383548309a8f9121668826a628ec250c57a1c.tar.gz |
IVGCVSW-3554 Update workloads to pass Softmax Axis Parameter to Backends
* Add check in CL and Neon to ensure axis is 1 otherwise
return unsupported.
* Edit CreateWorkload test and JsonPrinter test to ensure axis of 1.
Change-Id: I499b405532e26fefc2dd1c18b6dc6005813b5604
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
Diffstat (limited to 'src/backends/cl/ClLayerSupport.cpp')
-rw-r--r-- | src/backends/cl/ClLayerSupport.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backends/cl/ClLayerSupport.cpp b/src/backends/cl/ClLayerSupport.cpp index 7eb1dcf39a..b737daf7f4 100644 --- a/src/backends/cl/ClLayerSupport.cpp +++ b/src/backends/cl/ClLayerSupport.cpp @@ -594,8 +594,14 @@ bool ClLayerSupport::IsSoftmaxSupported(const TensorInfo& input, const SoftmaxDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported) const { + if (!(descriptor.m_Axis == 1 || + (descriptor.m_Axis < 0 && static_cast<int>(input.GetNumDimensions()) + descriptor.m_Axis == 1))) + { + SetValueChecked(reasonIfUnsupported, "Cl Softmax: Only supports Axis equal to 1."); + return false; + } ignore_unused(descriptor); - FORWARD_WORKLOAD_VALIDATE_FUNC(ClSoftmaxWorkloadValidate, reasonIfUnsupported, input, output); + FORWARD_WORKLOAD_VALIDATE_FUNC(ClSoftmaxWorkloadValidate, reasonIfUnsupported, input, output, descriptor); } bool ClLayerSupport::IsSpaceToBatchNdSupported(const TensorInfo& input, |