blob: 67e7b8b7b123cd029d15bf4118eeaac50b543ed8 [file] [log] [blame]
telsoa014fcda012018-03-09 14:13:49 +00001//
Teresa Charlin588cbdf2022-01-19 15:55:37 +00002// Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
David Beckecb56cd2018-09-05 12:52:57 +01003// SPDX-License-Identifier: MIT
telsoa014fcda012018-03-09 14:13:49 +00004//
5
6#pragma once
7
Colm Donelan0c479742021-12-10 12:43:54 +00008#include <armnn/backends/Workload.hpp>
Matthew Bentham14e46692018-09-20 15:35:30 +01009
Matthew Bentham9b3e7382020-02-05 21:39:55 +000010#include <arm_compute/runtime/CL/functions/CLL2NormalizeLayer.h>
telsoa014fcda012018-03-09 14:13:49 +000011
12namespace armnn
13{
14
telsoa01c577f2c2018-08-31 09:22:23 +010015arm_compute::Status ClL2NormalizationWorkloadValidate(const TensorInfo& input,
Matteo Martincighbcd3c852018-09-28 14:14:12 +010016 const TensorInfo& output,
17 const L2NormalizationDescriptor& descriptor);
telsoa01c577f2c2018-08-31 09:22:23 +010018
arovir019e53a352018-08-31 15:26:35 +010019class ClL2NormalizationFloatWorkload : public FloatWorkload<L2NormalizationQueueDescriptor>
telsoa014fcda012018-03-09 14:13:49 +000020{
21public:
Sadik Armagane9444752020-12-02 11:28:58 +000022 ClL2NormalizationFloatWorkload(const L2NormalizationQueueDescriptor& descriptor,
23 const WorkloadInfo& info,
24 const arm_compute::CLCompileContext& clCompileContext);
telsoa014fcda012018-03-09 14:13:49 +000025
26 void Execute() const override;
David Monahanec819992022-02-10 14:47:13 +000027 // Replace input tensor handle with the given TensorHandle
28 void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override;
29
30 // Replace output tensor handle with the given TensorHandle
31 void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override;
telsoa014fcda012018-03-09 14:13:49 +000032
33private:
34 // Purposely not a CLL2Normalize function. See constructor.
FrancisMurtagh81f22322018-11-16 12:26:20 +000035 mutable arm_compute::CLL2NormalizeLayer m_Layer;
David Monahanec819992022-02-10 14:47:13 +000036 virtual void Reconfigure();
telsoa014fcda012018-03-09 14:13:49 +000037};
38
39} //namespace armnn
40
41
42
43