Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include <armnn/Tensor.hpp> |
| 9 | #include <armnn/Descriptors.hpp> |
| 10 | |
| 11 | #include <backendsCommon/Workload.hpp> |
| 12 | |
| 13 | #include <arm_compute/runtime/CL/functions/CLDeconvolutionLayer.h> |
| 14 | #include <arm_compute/runtime/MemoryManagerOnDemand.h> |
| 15 | |
| 16 | #include <memory> |
| 17 | |
| 18 | namespace armnn |
| 19 | { |
| 20 | |
| 21 | arm_compute::Status ClTransposeConvolution2dWorkloadValidate(const TensorInfo& input, |
| 22 | const TensorInfo& output, |
| 23 | const TransposeConvolution2dDescriptor& descriptor, |
| 24 | const TensorInfo& weights, |
| 25 | const Optional<TensorInfo>& biases); |
| 26 | |
| 27 | class ClTransposeConvolution2dWorkload : public BaseWorkload<TransposeConvolution2dQueueDescriptor> |
| 28 | { |
| 29 | public: |
| 30 | ClTransposeConvolution2dWorkload(const TransposeConvolution2dQueueDescriptor& descriptor, |
| 31 | const WorkloadInfo& info, |
Sadik Armagan | e944475 | 2020-12-02 11:28:58 +0000 | [diff] [blame] | 32 | std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager, |
| 33 | const arm_compute::CLCompileContext& clCompileContext); |
Aron Virginas-Tar | 7a3e2fe | 2019-06-27 18:54:47 +0100 | [diff] [blame] | 34 | |
| 35 | void Execute() const override; |
| 36 | |
| 37 | private: |
| 38 | mutable arm_compute::CLDeconvolutionLayer m_Layer; |
| 39 | |
| 40 | std::unique_ptr<arm_compute::CLTensor> m_WeightsTensor; |
| 41 | std::unique_ptr<arm_compute::CLTensor> m_BiasesTensor; |
| 42 | |
| 43 | void FreeUnusedTensors(); |
| 44 | }; |
| 45 | |
| 46 | } // namespace armnn |
| 47 | |