Nattapat Chaimanowong | 7714088 | 2018-10-17 11:12:19 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
Matthew Bentham | d80a712 | 2019-01-08 17:52:37 +0000 | [diff] [blame] | 8 | #include <backendsCommon/Workload.hpp> |
| 9 | |
| 10 | #include <arm_compute/runtime/IFunction.h> |
| 11 | #include <arm_compute/runtime/Tensor.h> |
| 12 | |
| 13 | #include <memory> |
Nattapat Chaimanowong | 7714088 | 2018-10-17 11:12:19 +0100 | [diff] [blame] | 14 | |
| 15 | namespace armnn |
| 16 | { |
| 17 | |
| 18 | arm_compute::Status NeonDepthwiseConvolutionWorkloadValidate(const TensorInfo& input, |
| 19 | const TensorInfo& output, |
| 20 | const DepthwiseConvolution2dDescriptor& descriptor, |
| 21 | const TensorInfo& weights, |
| 22 | const Optional<TensorInfo>& biases); |
| 23 | |
| 24 | class NeonDepthwiseConvolutionWorkload : public BaseWorkload<DepthwiseConvolution2dQueueDescriptor> |
| 25 | { |
| 26 | public: |
| 27 | NeonDepthwiseConvolutionWorkload(const DepthwiseConvolution2dQueueDescriptor& descriptor, |
| 28 | const WorkloadInfo& info); |
| 29 | |
| 30 | virtual void Execute() const override; |
| 31 | |
| 32 | private: |
| 33 | mutable std::unique_ptr<arm_compute::IFunction> m_pDepthwiseConvolutionLayer; |
| 34 | |
| 35 | std::unique_ptr<arm_compute::Tensor> m_KernelTensor; |
| 36 | std::unique_ptr<arm_compute::Tensor> m_BiasTensor; |
| 37 | |
| 38 | void FreeUnusedTensors(); |
| 39 | }; |
| 40 | |
| 41 | } // namespace armnn |