aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2019-06-06 16:08:30 +0100
committerAron Virginas-Tar <Aron.Virginas-Tar@arm.com>2019-06-07 09:45:51 +0100
commita37e1bd2e9298360ef2481bea331c97ba65e3133 (patch)
tree8e6f606ec28a74967ddfcbbb90daf774592dc0a5
parentf2aaab3a06024b5d5c538cc42799fb2c91b4ca2b (diff)
downloadarmnn-a37e1bd2e9298360ef2481bea331c97ba65e3133.tar.gz
IVGCVSW-3237 Add type check to RefLayerSupport::IsDetectionPostProcessSupported
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I68ff6f3682a93689a890fff46bb1a6ccb1acda20
-rw-r--r--src/backends/reference/RefLayerSupport.cpp21
1 files 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<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,