From 52dc527f422e9eb57743d624ca43e2f22e5adcc0 Mon Sep 17 00:00:00 2001 From: Narumol Prangnawarat Date: Tue, 6 Aug 2019 17:34:26 +0100 Subject: IVGCVSW-3614 Limit support of Softmax to 2D with axis 1 in HAL 1.2 Signed-off-by: Narumol Prangnawarat Change-Id: I3ef659c8b87f2c0a3d3ed5d14f74f3b05a9f94b9 --- 1.2/HalPolicy.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/1.2/HalPolicy.cpp b/1.2/HalPolicy.cpp index e084947e..821a0f30 100644 --- a/1.2/HalPolicy.cpp +++ b/1.2/HalPolicy.cpp @@ -1260,6 +1260,13 @@ bool HalPolicy::ConvertSoftmax(const Operation& operation, const Model& model, C return Fail("%s: Operation has invalid inputs", __func__); } + if (input.GetTensorInfo().GetNumDimensions() > 2 || + !(desc.m_Axis == 1 || + (desc.m_Axis < 0 && static_cast(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, -- cgit v1.2.1