Mike Kelly | 831faed | 2018-11-28 11:52:08 +0000 | [diff] [blame] | 1 | // |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 2 | // Copyright © 2017-2018,2020-2023 Arm Ltd and Contributors. All rights reserved. |
Mike Kelly | 831faed | 2018-11-28 11:52:08 +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 "ClBaseWorkload.hpp" |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 9 | #include "ClWorkloadUtils.hpp" |
| 10 | |
Matthew Bentham | 9b3e738 | 2020-02-05 21:39:55 +0000 | [diff] [blame] | 11 | #include <arm_compute/runtime/CL/functions/CLBatchToSpaceLayer.h> |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 12 | #include <arm_compute/runtime/CL/functions/CLReshapeLayer.h> |
Mike Kelly | 831faed | 2018-11-28 11:52:08 +0000 | [diff] [blame] | 13 | |
| 14 | namespace armnn |
| 15 | { |
| 16 | |
| 17 | arm_compute::Status ClBatchToSpaceNdWorkloadValidate(const TensorInfo& input, |
| 18 | const TensorInfo& output, |
Keith Davis | bcd860a | 2021-08-05 14:20:33 +0100 | [diff] [blame] | 19 | const BatchToSpaceNdDescriptor& descriptor); |
Mike Kelly | 831faed | 2018-11-28 11:52:08 +0000 | [diff] [blame] | 20 | |
Teresa Charlin | 588cbdf | 2022-01-19 15:55:37 +0000 | [diff] [blame] | 21 | class ClBatchToSpaceNdWorkload : public ClBaseWorkload<BatchToSpaceNdQueueDescriptor> |
Mike Kelly | 831faed | 2018-11-28 11:52:08 +0000 | [diff] [blame] | 22 | { |
| 23 | public: |
Sadik Armagan | e944475 | 2020-12-02 11:28:58 +0000 | [diff] [blame] | 24 | ClBatchToSpaceNdWorkload(const BatchToSpaceNdQueueDescriptor& descriptor, |
| 25 | const WorkloadInfo& info, |
| 26 | const arm_compute::CLCompileContext& clCompileContext); |
Mike Kelly | 831faed | 2018-11-28 11:52:08 +0000 | [diff] [blame] | 27 | |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 28 | virtual void Execute() const override; |
Mike Kelly | 831faed | 2018-11-28 11:52:08 +0000 | [diff] [blame] | 29 | |
| 30 | private: |
Mike Kelly | 831faed | 2018-11-28 11:52:08 +0000 | [diff] [blame] | 31 | mutable arm_compute::CLBatchToSpaceLayer m_Layer; |
Teresa Charlin | 2ea403d | 2023-06-19 12:06:19 +0100 | [diff] [blame] | 32 | mutable std::unique_ptr<arm_compute::CLReshapeLayer> m_LayerReshapeInput; |
| 33 | mutable std::unique_ptr<arm_compute::CLReshapeLayer> m_LayerReshapeOutput; |
| 34 | arm_compute::CLTensor m_ReshapeInputTensor; |
| 35 | arm_compute::CLTensor m_ReshapeOutputTensor; |
Mike Kelly | 831faed | 2018-11-28 11:52:08 +0000 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } //namespace armnn |