telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | ecb56cd | 2018-09-05 12:52:57 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
David Beck | ac42efd | 2018-09-26 17:41:13 +0100 | [diff] [blame] | 8 | #include <backends/Workload.hpp> |
arovir01 | a682410 | 2018-08-28 17:40:45 +0100 | [diff] [blame] | 9 | |
Matthew Bentham | 14e4669 | 2018-09-20 15:35:30 +0100 | [diff] [blame] | 10 | #include <arm_compute/runtime/CL/CLFunctions.h> |
| 11 | |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 12 | namespace armnn |
| 13 | { |
| 14 | |
| 15 | arm_compute::Status ClDepthwiseConvolutionWorkloadValidate(const TensorInfo& input, |
| 16 | const TensorInfo& output, |
| 17 | const DepthwiseConvolution2dDescriptor& descriptor, |
| 18 | const TensorInfo& weights, |
David Beck | 5eec11d | 2018-10-04 15:43:17 +0100 | [diff] [blame^] | 19 | const Optional<TensorInfo>& biases); |
telsoa01 | c577f2c | 2018-08-31 09:22:23 +0100 | [diff] [blame] | 20 | |
| 21 | template<armnn::DataType... dataTypes> |
| 22 | class ClDepthwiseConvolutionBaseWorkload : public TypedWorkload<DepthwiseConvolution2dQueueDescriptor, dataTypes...> |
| 23 | { |
| 24 | public: |
| 25 | using TypedWorkload<DepthwiseConvolution2dQueueDescriptor, dataTypes...>::m_Data; |
| 26 | |
| 27 | ClDepthwiseConvolutionBaseWorkload(const DepthwiseConvolution2dQueueDescriptor& descriptor, |
| 28 | const WorkloadInfo& info); |
| 29 | |
| 30 | protected: |
| 31 | std::unique_ptr<arm_compute::IFunction> m_DepthwiseConvolutionLayer; |
| 32 | |
| 33 | std::unique_ptr<arm_compute::CLTensor> m_KernelTensor; |
| 34 | std::unique_ptr<arm_compute::CLTensor> m_BiasTensor; |
| 35 | |
| 36 | void FreeUnusedTensors(); |
| 37 | }; |
| 38 | |
| 39 | } //namespace armnn |