telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 1 | // |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 2 | // Copyright © 2017 Arm Ltd and Contributors. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Colm Donelan | 0c47974 | 2021-12-10 12:43:54 +0000 | [diff] [blame] | 8 | #include <armnn/backends/Workload.hpp> |
Matthew Bentham | d80a712 | 2019-01-08 17:52:37 +0000 | [diff] [blame] | 9 | |
| 10 | #include <arm_compute/core/Error.h> |
| 11 | #include <arm_compute/runtime/IFunction.h> |
David Beck | 0dbe0ee | 2018-09-24 15:59:27 +0100 | [diff] [blame] | 12 | #include <arm_compute/runtime/MemoryManagerOnDemand.h> |
surmeh01 | 3537c2c | 2018-05-18 16:31:43 +0100 | [diff] [blame] | 13 | |
Matthew Bentham | d80a712 | 2019-01-08 17:52:37 +0000 | [diff] [blame] | 14 | #include <memory> |
| 15 | |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 16 | namespace armnn |
| 17 | { |
| 18 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 19 | arm_compute::Status NeonNormalizationWorkloadValidate(const TensorInfo& input, |
| 20 | const TensorInfo& output, |
| 21 | const NormalizationDescriptor& descriptor); |
| 22 | |
arovir01 | 9e53a35 | 2018-08-31 15:26:35 +0100 | [diff] [blame] | 23 | class NeonNormalizationFloatWorkload : public FloatWorkload<NormalizationQueueDescriptor> |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 24 | { |
| 25 | public: |
arovir01 | 9e53a35 | 2018-08-31 15:26:35 +0100 | [diff] [blame] | 26 | NeonNormalizationFloatWorkload(const NormalizationQueueDescriptor& descriptor, const WorkloadInfo& info, |
| 27 | std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 28 | virtual void Execute() const override; |
David Monahan | ec81999 | 2022-02-10 14:47:13 +0000 | [diff] [blame] | 29 | // Replace input tensor handle with the given TensorHandle |
| 30 | void ReplaceInputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 31 | |
David Monahan | ec81999 | 2022-02-10 14:47:13 +0000 | [diff] [blame] | 32 | // Replace output tensor handle with the given TensorHandle |
| 33 | void ReplaceOutputTensorHandle(ITensorHandle* tensorHandle, unsigned int slot) override; |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 34 | private: |
Matthew Bentham | d80a712 | 2019-01-08 17:52:37 +0000 | [diff] [blame] | 35 | std::unique_ptr<arm_compute::IFunction> m_NormalizationLayer; |
David Monahan | ec81999 | 2022-02-10 14:47:13 +0000 | [diff] [blame] | 36 | virtual void Reconfigure(); |
telsoa01 | 4fcda01 | 2018-03-09 14:13:49 +0000 | [diff] [blame] | 37 | }; |
| 38 | |
| 39 | } //namespace armnn |
| 40 | |
| 41 | |
| 42 | |
| 43 | |