Sadik Armagan | 581742d | 2019-08-12 14:11:37 +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 <backendsCommon/Workload.hpp> |
| 9 | |
| 10 | #include <arm_compute/runtime/IFunction.h> |
| 11 | #include <arm_compute/runtime/Tensor.h> |
| 12 | #include <arm_compute/runtime/MemoryManagerOnDemand.h> |
| 13 | |
| 14 | #include <arm_compute/runtime/NEON/functions/NEDeconvolutionLayer.h> |
| 15 | |
| 16 | #include <memory> |
| 17 | |
| 18 | namespace armnn |
| 19 | { |
| 20 | |
| 21 | arm_compute::Status NeonTransposeConvolution2dWorkloadValidate(const TensorInfo& input, |
| 22 | const TensorInfo& output, |
| 23 | const TransposeConvolution2dDescriptor& descriptor, |
| 24 | const TensorInfo& weights, |
| 25 | const Optional<TensorInfo>& biases); |
| 26 | |
| 27 | class NeonTransposeConvolution2dWorkload : public BaseWorkload<TransposeConvolution2dQueueDescriptor> |
| 28 | { |
| 29 | public: |
| 30 | NeonTransposeConvolution2dWorkload(const TransposeConvolution2dQueueDescriptor& descriptor, |
| 31 | const WorkloadInfo& info, |
| 32 | std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager); |
| 33 | |
| 34 | void Execute() const override; |
| 35 | |
| 36 | private: |
| 37 | std::unique_ptr<arm_compute::NEDeconvolutionLayer> m_Layer; |
| 38 | |
| 39 | std::unique_ptr<arm_compute::Tensor> m_KernelTensor; |
| 40 | std::unique_ptr<arm_compute::Tensor> m_BiasTensor; |
| 41 | |
| 42 | void FreeUnusedTensors(); |
| 43 | }; |
| 44 | |
| 45 | } //namespace armnn |