diff options
author | James Conroy <james.conroy@arm.com> | 2020-11-18 14:20:53 +0000 |
---|---|---|
committer | Francis Murtagh <francis.murtagh@arm.com> | 2020-11-18 21:38:19 +0000 |
commit | fe3ec944c2573c54585f40b58ae6a36f8c19b009 (patch) | |
tree | 7abe3d7255c2ea595ca6ebd60dd18bcf242000fc /src/backends/cl/ClLayerSupport.cpp | |
parent | b8307527963240e1594a12636462fd0577b3c6f4 (diff) | |
download | armnn-fe3ec944c2573c54585f40b58ae6a36f8c19b009.tar.gz |
IVGCVSW-5092 Add CL Logical workload
* Add CL Logical workloads for NOT,
AND and OR.
* Enable Layer and IsSupported tests on CL.
Signed-off-by: James Conroy <james.conroy@arm.com>
Change-Id: I8b7227b2487fdbbb55a4baf6e61f290313947de1
Diffstat (limited to 'src/backends/cl/ClLayerSupport.cpp')
-rw-r--r-- | src/backends/cl/ClLayerSupport.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/backends/cl/ClLayerSupport.cpp b/src/backends/cl/ClLayerSupport.cpp index cce5c9b3bd..65454d4fc4 100644 --- a/src/backends/cl/ClLayerSupport.cpp +++ b/src/backends/cl/ClLayerSupport.cpp @@ -42,6 +42,9 @@ #include "workloads/ClInstanceNormalizationWorkload.hpp" #include "workloads/ClL2NormalizationFloatWorkload.hpp" #include "workloads/ClLogSoftmaxWorkload.hpp" +#include "workloads/ClLogicalAndWorkload.hpp" +#include "workloads/ClLogicalNotWorkload.hpp" +#include "workloads/ClLogicalOrWorkload.hpp" #include "workloads/ClLstmFloatWorkload.hpp" #include "workloads/ClMaximumWorkload.hpp" #include "workloads/ClMeanWorkload.hpp" @@ -460,6 +463,11 @@ bool ClLayerSupport::IsElementwiseUnarySupported(const TensorInfo& input, reasonIfUnsupported, input, output); + case UnaryOperation::LogicalNot: + FORWARD_WORKLOAD_VALIDATE_FUNC(ClLogicalNotWorkloadValidate, + reasonIfUnsupported, + input, + output); default: return false; } @@ -557,6 +565,34 @@ bool ClLayerSupport::IsL2NormalizationSupported(const TensorInfo& input, descriptor); } +bool ClLayerSupport::IsLogicalBinarySupported(const TensorInfo& input0, + const TensorInfo& input1, + const TensorInfo& output, + const LogicalBinaryDescriptor& descriptor, + Optional<std::string&> reasonIfUnsupported) const +{ + IgnoreUnused(output); + + switch(descriptor.m_Operation) + { + case LogicalBinaryOperation::LogicalAnd: + FORWARD_WORKLOAD_VALIDATE_FUNC(ClLogicalAndWorkloadValidate, + reasonIfUnsupported, + input0, + input1, + output); + case LogicalBinaryOperation::LogicalOr: + FORWARD_WORKLOAD_VALIDATE_FUNC(ClLogicalOrWorkloadValidate, + reasonIfUnsupported, + input0, + input1, + output); + default: + return false; + } +} + + bool ClLayerSupport::IsLogSoftmaxSupported(const TensorInfo& input, const TensorInfo& output, const LogSoftmaxDescriptor& descriptor, |