Ruomei Yan | 495852f | 2019-05-23 11:37:33 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | #include <backendsCommon/Workload.hpp> |
| 6 | #include <backendsCommon/WorkloadData.hpp> |
| 7 | #include "Decoders.hpp" |
| 8 | #include "Encoders.hpp" |
| 9 | |
| 10 | #include <armnn/TypesUtils.hpp> |
| 11 | |
| 12 | namespace armnn |
| 13 | { |
| 14 | |
| 15 | class RefDepthwiseConvolution2dWorkload : public BaseWorkload<DepthwiseConvolution2dQueueDescriptor> { |
| 16 | public: |
| 17 | explicit RefDepthwiseConvolution2dWorkload(const DepthwiseConvolution2dQueueDescriptor &descriptor, |
| 18 | const WorkloadInfo &info); |
| 19 | |
Ruomei Yan | 495852f | 2019-05-23 11:37:33 +0100 | [diff] [blame] | 20 | |
Finn Williams | b8181f7 | 2021-04-07 10:23:21 +0100 | [diff] [blame] | 21 | void Execute() const override; |
| 22 | void ExecuteAsync(WorkingMemDescriptor& workingMemDescriptor) override; |
Ruomei Yan | 495852f | 2019-05-23 11:37:33 +0100 | [diff] [blame] | 23 | |
| 24 | private: |
Finn Williams | b8181f7 | 2021-04-07 10:23:21 +0100 | [diff] [blame] | 25 | void Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const; |
Ruomei Yan | 495852f | 2019-05-23 11:37:33 +0100 | [diff] [blame] | 26 | |
James Conroy | 1f58f03 | 2021-04-27 17:13:27 +0100 | [diff] [blame] | 27 | std::unique_ptr <ScopedTensorHandle> m_Weight; |
| 28 | std::unique_ptr <ScopedTensorHandle> m_Bias; |
Ruomei Yan | 495852f | 2019-05-23 11:37:33 +0100 | [diff] [blame] | 29 | |
Ruomei Yan | 495852f | 2019-05-23 11:37:33 +0100 | [diff] [blame] | 30 | std::unique_ptr <Decoder<float>> m_FilterDecoder; |
| 31 | std::unique_ptr <Decoder<float>> m_BiasDecoder; |
| 32 | |
Ruomei Yan | 495852f | 2019-05-23 11:37:33 +0100 | [diff] [blame] | 33 | TensorShape m_FilterShape; |
| 34 | }; |
| 35 | |
| 36 | } //namespace armnn |