diff options
author | Finn Williams <Finn.Williams@arm.com> | 2020-06-10 15:53:46 +0100 |
---|---|---|
committer | Finn Williams <Finn.Williams@arm.com> | 2020-07-06 21:50:50 +0100 |
commit | 2605b236d103e1ba27069e0d668599042a4761af (patch) | |
tree | dc0a408acb5749a1f51544fd5857452377d05aab /src/backends/reference/RefLayerSupport.cpp | |
parent | c5789ca2e432075e2c92e7e0d99139c5329280e6 (diff) | |
download | armnn-2605b236d103e1ba27069e0d668599042a4761af.tar.gz |
IVGCVSW-4624 Add a RANK Reference Implementation
* Add Rank front end
* Add Rank reference implementation
* Add Rank serialization support
* Add Scalar serialization support
Signed-off-by: Finn Williams <Finn.Williams@arm.com>
Change-Id: I06e4a468c2a84e79bae2e6c5348596bbbf853b4b
Diffstat (limited to 'src/backends/reference/RefLayerSupport.cpp')
-rw-r--r-- | src/backends/reference/RefLayerSupport.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index 696c6d9dac..877d200208 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -1651,6 +1651,21 @@ bool RefLayerSupport::IsQuantizeSupported(const TensorInfo& input, return supported; } +bool RefLayerSupport::IsRankSupported(const TensorInfo& input, + const TensorInfo& output, + Optional<std::string&> reasonIfUnsupported) const +{ + IgnoreUnused(input); + // Define supported output types. + std::array<DataType,1> supportedOutputTypes = + { + DataType::Signed32, + }; + + return CheckSupportRule(TypeAnyOf(output, supportedOutputTypes), reasonIfUnsupported, + "Reference rank: input type not supported."); +} + bool RefLayerSupport::IsReshapeSupported(const TensorInfo& input, const TensorInfo& output, const ReshapeDescriptor& descriptor, |