blob: 9c591fc7a7bcfc9545fb9d89733f794d09c17b75 [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 Benthamd80a7122019-01-08 17:52:37 +00009
10#include <arm_compute/core/Error.h>
11#include <arm_compute/runtime/IFunction.h>
David Beck0dbe0ee2018-09-24 15:59:27 +010012#include <arm_compute/runtime/MemoryManagerOnDemand.h>
surmeh013537c2c2018-05-18 16:31:43 +010013
14#include <memory>
15
telsoa014fcda012018-03-09 14:13:49 +000016namespace armnn
17{
surmeh013537c2c2018-05-18 16:31:43 +010018
telsoa01c577f2c2018-08-31 09:22:23 +010019arm_compute::Status NeonL2NormalizationWorkloadValidate(const TensorInfo& input,
Matteo Martincighbcd3c852018-09-28 14:14:12 +010020 const TensorInfo& output,
21 const L2NormalizationDescriptor& descriptor);
telsoa01c577f2c2018-08-31 09:22:23 +010022
arovir019e53a352018-08-31 15:26:35 +010023class NeonL2NormalizationFloatWorkload : public FloatWorkload<L2NormalizationQueueDescriptor>
telsoa014fcda012018-03-09 14:13:49 +000024{
25public:
arovir019e53a352018-08-31 15:26:35 +010026 NeonL2NormalizationFloatWorkload(const L2NormalizationQueueDescriptor& descriptor, const WorkloadInfo& info,
27 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager);
telsoa014fcda012018-03-09 14:13:49 +000028 virtual void Execute() const override;
David Monahanec819992022-02-10 14:47:13 +000029 // Replace input tensor handle with the given TensorHandle
30 void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override;
telsoa014fcda012018-03-09 14:13:49 +000031
David Monahanec819992022-02-10 14:47:13 +000032 // Replace output tensor handle with the given TensorHandle
33 void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override;
telsoa014fcda012018-03-09 14:13:49 +000034private:
Matthew Benthamd80a7122019-01-08 17:52:37 +000035 std::unique_ptr<arm_compute::IFunction> m_Layer;
David Monahanec819992022-02-10 14:47:13 +000036 virtual void Reconfigure();
telsoa014fcda012018-03-09 14:13:49 +000037};
surmeh013537c2c2018-05-18 16:31:43 +010038
telsoa014fcda012018-03-09 14:13:49 +000039} //namespace armnn
40