diff options
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 |