From 3b9383548309a8f9121668826a628ec250c57a1c Mon Sep 17 00:00:00 2001 From: Francis Murtagh Date: Fri, 26 Jul 2019 15:44:17 +0100 Subject: 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 --- src/backends/cl/ClLayerSupport.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/backends/cl/ClLayerSupport.cpp') 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 reasonIfUnsupported) const { + if (!(descriptor.m_Axis == 1 || + (descriptor.m_Axis < 0 && static_cast(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, -- cgit v1.2.1