IVGCVSW-3614 Limit support of Softmax to 2D with axis 1 in HAL 1.2

Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I3ef659c8b87f2c0a3d3ed5d14f74f3b05a9f94b9
diff --git a/1.2/HalPolicy.cpp b/1.2/HalPolicy.cpp
index e084947..821a0f3 100644
--- a/1.2/HalPolicy.cpp
+++ b/1.2/HalPolicy.cpp
@@ -1260,6 +1260,13 @@
         return Fail("%s: Operation has invalid inputs", __func__);
     }
 
+    if (input.GetTensorInfo().GetNumDimensions() > 2 ||
+        !(desc.m_Axis == 1 ||
+          (desc.m_Axis < 0 && static_cast<int>(input.GetTensorInfo().GetNumDimensions()) + desc.m_Axis == 1)))
+    {
+        return Fail("%s: Unsupported input greater than 2D or axis != 1", __func__);
+    }
+
     bool isSupported = false;
     FORWARD_LAYER_SUPPORT_FUNC(__func__,
                                IsSoftmaxSupported,