From 73f66421c6719c007325b69d51ca73dd58eb8c33 Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Mon, 23 Sep 2019 19:11:59 +0100 Subject: IVGCVSW-3885 Add reference workload for DepthToSpace Signed-off-by: Aron Virginas-Tar Change-Id: Id937dc4425884ad1985dcdfaae8bf3fb64f0c766 --- src/backends/reference/RefLayerSupport.cpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/backends/reference/RefLayerSupport.cpp') diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index 14183a7b68..06da77603d 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -466,6 +466,34 @@ bool RefLayerSupport::IsDebugSupported(const TensorInfo& input, return supported; } +bool RefLayerSupport::IsDepthToSpaceSupported(const TensorInfo& input, + const TensorInfo& output, + const DepthToSpaceDescriptor& descriptor, + Optional reasonIfUnsupported) const +{ + ignore_unused(descriptor); + bool supported = true; + + std::array supportedTypes = + { + DataType::Float32, + DataType::Float16, + DataType::QuantisedAsymm8, + DataType::QuantisedSymm16 + }; + + supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, + "Reference DepthToSpace: input type not supported"); + + supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported, + "Reference DepthToSpace: output type not supported"); + + supported &= CheckSupportRule(TypesAreEqual(input, output), reasonIfUnsupported, + "Reference DepthToSpace: input and output types are mismatched"); + + return supported; +} + bool RefLayerSupport::IsDepthwiseConvolutionSupported(const TensorInfo& input, const TensorInfo& output, const DepthwiseConvolution2dDescriptor& descriptor, -- cgit v1.2.1