diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-11-18 16:52:07 +0000 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-11-18 19:00:53 +0000 |
commit | 0c95f4cd319874ffa4aba3a378e0e3346f688fdc (patch) | |
tree | 3c58b21e70304539508c9e8d563b34ba75fd9839 /src/backends/reference/RefLayerSupport.cpp | |
parent | 1670b0c047ab56c0b3b68088a3c53f38a91355b4 (diff) | |
download | armnn-0c95f4cd319874ffa4aba3a378e0e3346f688fdc.tar.gz |
Fix logical vts skip
* Add Boolean support for Reshape
* Use LogicalUnary factory and data type for LogicalNot
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I8e072fde200b7716556ae67f79616458cf98ff20
Diffstat (limited to 'src/backends/reference/RefLayerSupport.cpp')
-rw-r--r-- | src/backends/reference/RefLayerSupport.cpp | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/src/backends/reference/RefLayerSupport.cpp b/src/backends/reference/RefLayerSupport.cpp index b3feae6713..d1933c90c0 100644 --- a/src/backends/reference/RefLayerSupport.cpp +++ b/src/backends/reference/RefLayerSupport.cpp @@ -807,13 +807,29 @@ bool RefLayerSupport::IsElementwiseUnarySupported(const TensorInfo& input, DataType::Signed32 }; + std::array<DataType, 1> logicalSupportedTypes = + { + DataType::Boolean + }; + bool supported = true; - supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, - "Reference elementwise unary: input type not supported"); + if (descriptor.m_Operation == UnaryOperation::LogicalNot) + { + supported &= CheckSupportRule(TypeAnyOf(input, logicalSupportedTypes), reasonIfUnsupported, + "Reference elementwise unary: input type not supported"); - supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported, - "Reference elementwise unary: output type not supported"); + supported &= CheckSupportRule(TypeAnyOf(output, logicalSupportedTypes), reasonIfUnsupported, + "Reference elementwise unary: output type not supported"); + } + else + { + supported &= CheckSupportRule(TypeAnyOf(input, supportedTypes), reasonIfUnsupported, + "Reference elementwise unary: input type not supported"); + + supported &= CheckSupportRule(TypeAnyOf(output, supportedTypes), reasonIfUnsupported, + "Reference elementwise unary: output type not supported"); + } supported &= CheckSupportRule(TypesAreEqual(input, output), reasonIfUnsupported, "Reference elementwise unary: input and output types not matching"); @@ -1720,7 +1736,7 @@ bool RefLayerSupport::IsReshapeSupported(const TensorInfo& input, IgnoreUnused(output); IgnoreUnused(descriptor); // Define supported output types. - std::array<DataType,7> supportedOutputTypes = + std::array<DataType,8> supportedOutputTypes = { DataType::BFloat16, DataType::Float32, @@ -1728,7 +1744,8 @@ bool RefLayerSupport::IsReshapeSupported(const TensorInfo& input, DataType::Signed32, DataType::QAsymmS8, DataType::QAsymmU8, - DataType::QSymmS16 + DataType::QSymmS16, + DataType::Boolean }; return CheckSupportRule(TypeAnyOf(input, supportedOutputTypes), reasonIfUnsupported, |