diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-07-08 11:36:05 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2019-07-08 14:06:12 +0100 |
commit | 86bb4e1dba0f9dba202076c7bf7eb42e90e1eda3 (patch) | |
tree | a10f17bce4ec981a94e04f2ef79663a949f23a65 /src/backends/reference/RefLayerSupport.cpp | |
parent | ec8e198a00d9af1aa02c77709b3c452eb09bb541 (diff) | |
download | armnn-86bb4e1dba0f9dba202076c7bf7eb42e90e1eda3.tar.gz |
IVGCVSW-3399 Add support of QuantisedSymm16 to Permute and unit tests
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: Id6ab073ae3e0ff5f60c2f4bef975798ce71c9f88
Diffstat (limited to 'src/backends/reference/RefLayerSupport.cpp')
-rw-r--r-- | src/backends/reference/RefLayerSupport.cpp | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index f3758760fc..087acd2103 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -1253,12 +1253,27 @@ bool RefLayerSupport::IsPermuteSupported(const TensorInfo& input, const PermuteDescriptor& descriptor, Optional<std::string&> reasonIfUnsupported) const { - ignore_unused(output); ignore_unused(descriptor); - return IsSupportedForDataTypeRef(reasonIfUnsupported, - input.GetDataType(), - &TrueFunc<>, - &TrueFunc<>); + bool supported = true; + + // Define supported output and inputs types. + std::array<DataType,3> supportedTypes = + { + DataType::Float32, + DataType::QuantisedAsymm8, + DataType::QuantisedSymm16 + }; + + supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, + "Reference permute: input is not a supported type."); + + supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported, + "Reference permute: output is not a supported type."); + + supported &= CheckSupportRule(TypesAreEqual(input, output), reasonIfUnsupported, + "Reference permute: input and output types are mismatched."); + + return supported; } bool RefLayerSupport::IsPooling2dSupported(const TensorInfo& input, |