diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-08-06 17:34:26 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-08-06 17:34:26 +0100 |
commit | 52dc527f422e9eb57743d624ca43e2f22e5adcc0 (patch) | |
tree | e33d0cb7e3a91875edbaf243db7591d169edbf42 /1.2/HalPolicy.cpp | |
parent | 7efb46d283eee8a9cf10f5329176b92b2f830ed6 (diff) | |
download | android-nn-driver-52dc527f422e9eb57743d624ca43e2f22e5adcc0.tar.gz |
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
Diffstat (limited to '1.2/HalPolicy.cpp')
-rw-r--r-- | 1.2/HalPolicy.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
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<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, |