diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-07-04 10:29:00 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-07-08 07:49:31 +0000 |
commit | 47cfee9358be7a5c1c71e4ab7e94bec2557248c1 (patch) | |
tree | 6608cbbba1377e0384c2517fee2a4b34509356c0 /src/backends/reference/RefLayerSupport.cpp | |
parent | d2aa85ee2a0f574bcba50a376721f15c7e99308d (diff) | |
download | armnn-47cfee9358be7a5c1c71e4ab7e94bec2557248c1.tar.gz |
IVGCVSW-3399 Add support of QuantisedSymm16 to Debug and unit tests,
refactor to be done
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I6dbf6a2aa328b8c843632e1231931b4e1c6888bb
Diffstat (limited to 'src/backends/reference/RefLayerSupport.cpp')
-rw-r--r-- | src/backends/reference/RefLayerSupport.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index ae668f31f3..f3758760fc 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -533,11 +533,25 @@ bool RefLayerSupport::IsDebugSupported(const TensorInfo& input, const TensorInfo& output, Optional<std::string&> reasonIfUnsupported) const { - ignore_unused(output); - return IsSupportedForDataTypeRef(reasonIfUnsupported, - input.GetDataType(), - &TrueFunc<>, - &TrueFunc<>); + bool supported = true; + + std::array<DataType,3> supportedTypes = + { + DataType::Float32, + DataType::QuantisedAsymm8, + DataType::QuantisedSymm16 + }; + + supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, + "Reference debug: input type not supported"); + + supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported, + "Reference debug: output type not supported"); + + supported &= CheckSupportRule(TypesAreEqual(input, output), reasonIfUnsupported, + "Reference debug: input and output types are mismatched"); + + return supported; } bool RefLayerSupport::IsDepthwiseConvolutionSupported(const TensorInfo& input, |