From f4bfa6ae12d0f6385b2017c1d98ba9c2ec0d59f4 Mon Sep 17 00:00:00 2001 From: Ryan OShea Date: Wed, 10 Jun 2020 11:33:37 +0100 Subject: IVGCVSW-4620 Add Fill Reference Implementation * Add Fill Reference Implementation * Refactor FP converter to use static_cast Signed-off-by: Ryan OShea Signed-off-by: Keith Davis Change-Id: I532e2f982981d047690755fac43a0e9cf8b17dcd --- src/backends/reference/RefLayerSupport.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/backends/reference/RefLayerSupport.cpp') diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index 2e404f9c61..52a763247e 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -857,6 +857,28 @@ bool RefLayerSupport::IsFakeQuantizationSupported(const TensorInfo& input, return supported; } +bool RefLayerSupport::IsFillSupported(const TensorInfo& input, + const TensorInfo& output, + const FillDescriptor& descriptor, + Optional reasonIfUnsupported) const +{ + IgnoreUnused(descriptor); + IgnoreUnused(output); + + bool supported = true; + + std::array supportedTypes = + { + DataType::Float32, + DataType::Float16 + }; + + supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, + "Reference Fill: input type not supported."); + + return supported; +} + bool RefLayerSupport::IsFloorSupported(const TensorInfo& input, const TensorInfo& output, Optional reasonIfUnsupported) const -- cgit v1.2.1