diff options
author | Teresa Charlin <teresa.charlinreyes@arm.com> | 2022-04-27 16:26:11 +0100 |
---|---|---|
committer | TeresaARM <teresa.charlinreyes@arm.com> | 2022-05-10 10:07:55 +0000 |
commit | 989e2f6c71b979f6aaf3c653808a7893fb0dd1c3 (patch) | |
tree | e86358ba2a7bf9fb279b0b3c67a703a415454fa9 /src/backends/cl/workloads/ClGatherNdWorkload.hpp | |
parent | b190da2779b0419472c0734176c703a252d47b8b (diff) | |
download | armnn-989e2f6c71b979f6aaf3c653808a7893fb0dd1c3.tar.gz |
IVGCVSW-6861 Add GATHERNd CL workload
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com>
Change-Id: I8ba7e56062c285c672dcaa9d13be319eb4f1fca6
Diffstat (limited to 'src/backends/cl/workloads/ClGatherNdWorkload.hpp')
-rw-r--r-- | src/backends/cl/workloads/ClGatherNdWorkload.hpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/backends/cl/workloads/ClGatherNdWorkload.hpp b/src/backends/cl/workloads/ClGatherNdWorkload.hpp new file mode 100644 index 0000000000..dd30024cc7 --- /dev/null +++ b/src/backends/cl/workloads/ClGatherNdWorkload.hpp @@ -0,0 +1,42 @@ +// +// Copyright © 2022 Arm Ltd and Contributors. All rights reserved. +// SPDX-License-Identifier: MIT +// + +#pragma once + +#include "ClBaseWorkload.hpp" + +#include "arm_compute/runtime/Tensor.h" +#include "arm_compute/runtime/CL/functions/CLGather.h" +#include "arm_compute/runtime/CL/functions/CLPixelWiseMultiplication.h" +#include "arm_compute/runtime/CL/functions/CLReductionOperation.h" +#include "arm_compute/runtime/CL/functions/CLReshapeLayer.h" + +namespace armnn +{ +arm_compute::Status ClGatherNdWorkloadValidate(const TensorInfo& params, + const TensorInfo& indices, + const TensorInfo& output); + +class ClGatherNdWorkload : public ClBaseWorkload<GatherNdQueueDescriptor> +{ +public: + ClGatherNdWorkload(const GatherNdQueueDescriptor& descriptor, + const WorkloadInfo& info, + const arm_compute::CLCompileContext& clCompileContext); + virtual void Execute() const override; + +private: + arm_compute::CLTensor m_FlattenedCoeff; + arm_compute::CLTensor m_OutputMul; + arm_compute::CLTensor m_FlattenedIndices; + arm_compute::CLTensor m_OutputGather; + + mutable arm_compute::CLPixelWiseMultiplication m_MulLayer; + mutable arm_compute::CLReductionOperation m_ReduceSumLayer; + mutable arm_compute::CLGather m_GatherLayer; + mutable arm_compute::CLReshapeLayer m_ReshapeLayer; +}; + +} //namespace armnn
\ No newline at end of file |