1 // 2 // Copyright © 2017 Arm Ltd and Contributors. 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 "ClBaseWorkload.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 ClBaseWorkload<TransposeConvolution2dQueueDescriptor> 28 { 29 public: 30 ClTransposeConvolution2dWorkload(const TransposeConvolution2dQueueDescriptor& descriptor, 31 const WorkloadInfo& info, 32 std::shared_ptr<arm_compute::MemoryManagerOnDemand>& memoryManager, 33 const arm_compute::CLCompileContext& clCompileContext); 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 48