IVGCVSW-3237 Add type check to RefLayerSupport::IsDetectionPostProcessSupported
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
Change-Id: I68ff6f3682a93689a890fff46bb1a6ccb1acda20
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp
index 0b33aff..f2ab9ed 100644
--- a/src/backends/reference/RefLayerSupport.cpp
+++ b/src/backends/reference/RefLayerSupport.cpp
@@ -526,11 +526,22 @@
const armnn::DetectionPostProcessDescriptor& descriptor,
armnn::Optional<std::string&> reasonIfUnsupported) const
{
- ignore_unused(input1);
- return IsSupportedForDataTypeRef(reasonIfUnsupported,
- input0.GetDataType(),
- &TrueFunc<>,
- &TrueFunc<>);
+ bool supported = true;
+
+ std::vector<DataType> 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,