blob: e9588f4d4157aafc50bb6873d17bbc82d98b80c2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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
|