Mike Kelly | 5685802 | 2020-01-27 12:14:47 +0000 | [diff] [blame] | 1 | // |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 2 | // Copyright © 2020-2023 Arm Ltd and Contributors. All rights reserved. |
Mike Kelly | 5685802 | 2020-01-27 12:14:47 +0000 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 8 | #include "NeonBaseWorkload.hpp" |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 9 | #include "NeonWorkloadUtils.hpp" |
Mike Kelly | 5685802 | 2020-01-27 12:14:47 +0000 | [diff] [blame] | 10 | |
| 11 | #include <arm_compute/runtime/NEON/functions/NEBatchToSpaceLayer.h> |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 12 | #include <arm_compute/runtime/NEON/functions/NEReshapeLayer.h> |
Mike Kelly | 5685802 | 2020-01-27 12:14:47 +0000 | [diff] [blame] | 13 | |
| 14 | namespace armnn |
| 15 | { |
| 16 | |
| 17 | arm_compute::Status NeonBatchToSpaceNdWorkloadValidate(const TensorInfo& input, |
| 18 | const TensorInfo& output, |
| 19 | const BatchToSpaceNdDescriptor& descriptor); |
| 20 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 21 | class NeonBatchToSpaceNdWorkload : public NeonBaseWorkload<BatchToSpaceNdQueueDescriptor> |
Mike Kelly | 5685802 | 2020-01-27 12:14:47 +0000 | [diff] [blame] | 22 | { |
| 23 | public: |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 24 | using NeonBaseWorkload<BatchToSpaceNdQueueDescriptor>::NeonBaseWorkload; |
Mike Kelly | 5685802 | 2020-01-27 12:14:47 +0000 | [diff] [blame] | 25 | |
| 26 | NeonBatchToSpaceNdWorkload(const BatchToSpaceNdQueueDescriptor& descriptor, const WorkloadInfo& info); |
| 27 | |
| 28 | virtual void Execute() const override; |
| 29 | |
| 30 | private: |
| 31 | mutable std::unique_ptr<arm_compute::NEBatchToSpaceLayer> m_Layer; |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 32 | mutable std::unique_ptr<arm_compute::NEReshapeLayer> m_LayerReshapeInput; |
| 33 | mutable std::unique_ptr<arm_compute::NEReshapeLayer> m_LayerReshapeOutput; |
| 34 | arm_compute::Tensor m_ReshapeInputTensor; |
| 35 | arm_compute::Tensor m_ReshapeOutputTensor; |
Mike Kelly | 5685802 | 2020-01-27 12:14:47 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } |