blob: 3b2c76ade01734f82d4592ee294d6aa3550e273a [file] [log] [blame]
Mike Kelly9b398322019-05-22 17:21:49 +01001//
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#include <backendsCommon/WorkloadData.hpp>
10#include "Decoders.hpp"
11#include "Encoders.hpp"
12
13namespace armnn
14{
15
16class RefConvolution2dWorkload : public BaseWorkload<Convolution2dQueueDescriptor>
17{
18public:
19 explicit RefConvolution2dWorkload(const Convolution2dQueueDescriptor& descriptor,
20 const WorkloadInfo& info);
21
Mike Kelly9b398322019-05-22 17:21:49 +010022
Finn Williamsb8181f72021-04-07 10:23:21 +010023 void Execute() const override;
24 void ExecuteAsync(WorkingMemDescriptor& workingMemDescriptor) override;
Mike Kelly9b398322019-05-22 17:21:49 +010025
26private:
Finn Williamsb8181f72021-04-07 10:23:21 +010027 void Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const;
James Conroy1f58f032021-04-27 17:13:27 +010028 std::unique_ptr<ScopedTensorHandle> m_Weight;
29 std::unique_ptr<ScopedTensorHandle> m_Bias;
Mike Kelly9b398322019-05-22 17:21:49 +010030
Mike Kelly9b398322019-05-22 17:21:49 +010031 std::unique_ptr<Decoder<float>> m_FilterDecoder;
32 std::unique_ptr<Decoder<float>> m_BiasDecoder;
33
Mike Kelly9b398322019-05-22 17:21:49 +010034 TensorShape m_FilterShape;
35};
36
37} //namespace armnn
38