• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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/core/Error.h>
12 #include <arm_compute/runtime/CL/CLTensor.h>
13 
14 namespace armnn
15 {
16 
17 arm_compute::Status ClDepthwiseConvolutionWorkloadValidate(const TensorInfo& input,
18                                                            const TensorInfo& output,
19                                                            const DepthwiseConvolution2dDescriptor& descriptor,
20                                                            const TensorInfo& weights,
21                                                            const Optional<TensorInfo>& biases,
22                                                            const ActivationDescriptor* activationDescriptor = nullptr);
23 
24 class ClDepthwiseConvolutionWorkload : public BaseWorkload<DepthwiseConvolution2dQueueDescriptor>
25 {
26 public:
27     using BaseWorkload<DepthwiseConvolution2dQueueDescriptor>::m_Data;
28 
29     ClDepthwiseConvolutionWorkload(const DepthwiseConvolution2dQueueDescriptor& descriptor,
30                                    const WorkloadInfo& info);
31 
32     void Execute() const override;
33 
34 protected:
35     std::unique_ptr<arm_compute::IFunction> m_DepthwiseConvolutionLayer;
36 
37     std::unique_ptr<arm_compute::CLTensor> m_KernelTensor;
38     std::unique_ptr<arm_compute::CLTensor> m_BiasTensor;
39 
40     void FreeUnusedTensors();
41 };
42 
43 } //namespace armnn
44