From a37e1bd2e9298360ef2481bea331c97ba65e3133 Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Thu, 6 Jun 2019 16:08:30 +0100 Subject: IVGCVSW-3237 Add type check to RefLayerSupport::IsDetectionPostProcessSupported Signed-off-by: Aron Virginas-Tar Change-Id: I68ff6f3682a93689a890fff46bb1a6ccb1acda20 --- src/backends/reference/RefLayerSupport.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index 0b33affb16..f2ab9edca7 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -526,11 +526,22 @@ bool RefLayerSupport::IsDetectionPostProcessSupported(const armnn::TensorInfo& i const armnn::DetectionPostProcessDescriptor& descriptor, armnn::Optional reasonIfUnsupported) const { - ignore_unused(input1); - return IsSupportedForDataTypeRef(reasonIfUnsupported, - input0.GetDataType(), - &TrueFunc<>, - &TrueFunc<>); + bool supported = true; + + std::vector supportedInputTypes = + { + DataType::Float32, + DataType::QuantisedAsymm8, + DataType::QuantisedSymm16 + }; + + supported &= CheckSupportRule(TypeAnyOf(input0, supportedInputTypes), reasonIfUnsupported, + "Reference DetectionPostProcess: input 0 is not a supported type."); + + supported &= CheckSupportRule(TypeAnyOf(input1, supportedInputTypes), reasonIfUnsupported, + "Reference DetectionPostProcess: input 1 is not a supported type."); + + return supported; } bool RefLayerSupport::IsDilatedDepthwiseConvolutionSupported(const TensorInfo& input, -- cgit v1.2.1