diff options
author | Sadik Armagan <sadik.armagan@arm.com> | 2021-02-09 10:28:54 +0000 |
---|---|---|
committer | Sadik Armagan <sadik.armagan@arm.com> | 2021-02-09 10:31:14 +0000 |
commit | a2747487fbe7eb6d9f5357c6d16c32355ed6e01c (patch) | |
tree | 6f6f8b38100d16f1ec8a0e5be71e8e6ae1cc600a /src/backends/aclCommon | |
parent | ac001eebca101f2df4973d2f1d8cfca026e07419 (diff) | |
download | armnn-a2747487fbe7eb6d9f5357c6d16c32355ed6e01c.tar.gz |
MLCE-347 'REDUCE_MIN, REDUCE_MAX, REDUCE_SUM Support'
* Added TfLiteParser support for REDUCE_MIN and REDUCE_MAX operators
* Added ACL workloads support for REDUCE_MIN, REDUCE_MAX, and REDUCE_SUM operators
* Added TfLite Delegate support for REDUCE_MIN, REDUCE_MAX, and REDUCE_SUM operators
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com>
Change-Id: I8085d59946bfd4ab78a59a61f899031ae53371a8
Diffstat (limited to 'src/backends/aclCommon')
-rw-r--r-- | src/backends/aclCommon/ArmComputeUtils.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/backends/aclCommon/ArmComputeUtils.hpp b/src/backends/aclCommon/ArmComputeUtils.hpp index 2a0707872e..d9efab288f 100644 --- a/src/backends/aclCommon/ArmComputeUtils.hpp +++ b/src/backends/aclCommon/ArmComputeUtils.hpp @@ -255,4 +255,16 @@ inline unsigned int ComputePositiveAxis(const int& axis, const armnn::TensorInfo return static_cast<unsigned int>(positiveAxis); } +inline arm_compute::ReductionOperation ConvertReductionOperationToAcl(const ReduceDescriptor& descriptor) +{ + switch (descriptor.m_ReduceOperation) + { + case ReduceOperation::Sum: return arm_compute::ReductionOperation::SUM; + case ReduceOperation::Mean: return arm_compute::ReductionOperation::MEAN_SUM; + case ReduceOperation::Max: return arm_compute::ReductionOperation::MAX; + case ReduceOperation::Min: return arm_compute::ReductionOperation::MIN; + default: throw InvalidArgumentException("Unsupported Reduction operation"); + } +} + } // namespace armnn |