From 68c2c903e94a96b1663cffa3e5981a5869dc8b92 Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Thu, 19 Sep 2019 11:21:11 +0100 Subject: IVGCVSW-3723 Adding reference workload support for ArgMinMax Change-Id: I65209ecec4e3abf808163239748d6e830568c2e3 Signed-off-by: Nikhil Raj --- src/backends/reference/RefLayerSupport.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/backends/reference/RefLayerSupport.cpp') diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index 572f617636..14183a7b68 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -192,6 +192,29 @@ bool RefLayerSupport::IsAdditionSupported(const TensorInfo& input0, return supported; } +bool RefLayerSupport::IsArgMinMaxSupported(const armnn::TensorInfo &input, const armnn::TensorInfo &output, + const armnn::ArgMinMaxDescriptor &descriptor, + armnn::Optional reasonIfUnsupported) const +{ + ignore_unused(descriptor); + + std::array supportedTypes = + { + DataType::Float32, + DataType::QuantisedAsymm8, + DataType::QuantisedSymm16 + }; + + bool supported = true; + + supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, + "Reference ArgMinMax: input is not a supported type."); + supported &= CheckSupportRule(TypeIs(output, DataType::Signed32), reasonIfUnsupported, + "Reference ArgMinMax: output type not supported"); + + return supported; +} + bool RefLayerSupport::IsBatchNormalizationSupported(const TensorInfo& input, const TensorInfo& output, const TensorInfo& mean, -- cgit v1.2.1