diff options
author | Keith Davis <keith.davis@arm.com> | 2019-06-14 17:33:22 +0100 |
---|---|---|
committer | Keith Davis <keith.davis@arm.com> | 2019-06-19 14:43:26 +0100 |
commit | a57eccbe313557b9eafec40b39bac3115d9b930d (patch) | |
tree | 2522157537f46fa2e54c0405d9e9e60f5f0a9ae1 /src/backends/reference/RefLayerSupport.cpp | |
parent | ab9e52563f624d9782b97400f643d2632cc8d770 (diff) | |
download | armnn-a57eccbe313557b9eafec40b39bac3115d9b930d.tar.gz |
IVGCVSW-3231 Add reference workload support for SpaceToDepth
* Added reference workload for SpaceToDepth
* Added unit tests for float32 & uint8
* Minor sort refactoring to RefWorkloads.hpp to alphabetical order
Change-Id: I2e01f8101650e2aae102a8a32bc0064f067141ab
Signed-off-by: Keith Davis <keith.davis@arm.com>
Diffstat (limited to 'src/backends/reference/RefLayerSupport.cpp')
-rw-r--r-- | src/backends/reference/RefLayerSupport.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index 077aa1ce3a..a1807819e3 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -1282,6 +1282,33 @@ bool RefLayerSupport::IsSpaceToBatchNdSupported(const TensorInfo& input, return supported; } +bool RefLayerSupport::IsSpaceToDepthSupported(const TensorInfo& input, + const TensorInfo& output, + const SpaceToDepthDescriptor& descriptor, + Optional<std::string&> reasonIfUnsupported) const +{ + + ignore_unused(descriptor); + bool supported = true; + + std::array<DataType,2> supportedTypes = + { + DataType::Float32, + DataType::QuantisedAsymm8, + }; + + supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, + "Reference SpaceToDepth: input type not supported"); + + supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported, + "Reference SpaceToDepth: output type not supported"); + + supported &= CheckSupportRule(TypesAreEqual(input, output), reasonIfUnsupported, + "Reference SpaceToDepth: input and output types are mismatched"); + + return supported; +} + bool RefLayerSupport::IsSplitterSupported(const TensorInfo& input, const ViewsDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported) const |