diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2022-04-26 18:14:12 +0100 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2022-05-05 08:49:41 +0000 |
commit | bd22c7d8d71bb9d6fdebcd07a472d66c7616abad (patch) | |
tree | 87a132055db845fab901e18fcb6edd6998e33f3f /src/backends/neon/workloads/NeonGatherNdWorkload.hpp | |
parent | 1299496996bc332f02218f926640a9255ed60310 (diff) | |
download | armnn-bd22c7d8d71bb9d6fdebcd07a472d66c7616abad.tar.gz |
IVGCVSW-6862 Add GATHERNd Neon workload
* Changing the test in the delegate to match one of the unit tests
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: I553ca266116ba8ee173fc951ab1ffd2b6eed1428
Diffstat (limited to 'src/backends/neon/workloads/NeonGatherNdWorkload.hpp')
-rw-r--r-- | src/backends/neon/workloads/NeonGatherNdWorkload.hpp | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/backends/neon/workloads/NeonGatherNdWorkload.hpp b/src/backends/neon/workloads/NeonGatherNdWorkload.hpp new file mode 100644 index 0000000000..848aac667b --- /dev/null +++ b/src/backends/neon/workloads/NeonGatherNdWorkload.hpp @@ -0,0 +1,41 @@ +// +// Copyright © 2022 Arm Ltd and Contributors. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include "NeonBaseWorkload.hpp" + +#include "arm_compute/runtime/Tensor.h" +#include "arm_compute/runtime/NEON/functions/NEGather.h" +#include "arm_compute/runtime/NEON/functions/NEPixelWiseMultiplication.h" +#include "arm_compute/runtime/NEON/functions/NEReductionOperation.h" +#include "arm_compute/runtime/NEON/functions/NEReshapeLayer.h" + +namespace armnn +{ +arm_compute::Status NeonGatherNdWorkloadValidate(const TensorInfo& input, + const TensorInfo& indices, + const TensorInfo& output); + +class NeonGatherNdWorkload : public NeonBaseWorkload<GatherNdQueueDescriptor> +{ +public: + NeonGatherNdWorkload(const GatherNdQueueDescriptor& descriptor, const WorkloadInfo& info); + virtual void Execute() const override; + +private: + arm_compute::Tensor m_FlattenedCoeff; + arm_compute::Tensor m_outputMul; + arm_compute::Tensor m_FlattenedIndices; + arm_compute::Tensor m_outputGather; + + mutable arm_compute::NEPixelWiseMultiplication m_MulLayer; + mutable arm_compute::NEReductionOperation m_ReduceSumLayer; + mutable arm_compute::NEGather m_GatherLayer; + mutable arm_compute::NEReshapeLayer m_ReshapeLayer; + +}; + +} //namespace armnn
\ No newline at end of file |