aboutsummaryrefslogtreecommitdiff
path: root/src/backends/reference/workloads/RefTransposeConvolution2dWorkload.hpp
blob: 9ded8c971f260804c26bb02e035a99fb4f50f8bd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// Copyright © 2017 Arm Ltd. All rights reserved.
// SPDX-License-Identifier: MIT
//

#pragma once

#include "Decoders.hpp"
#include "Encoders.hpp"

#include <backendsCommon/CpuTensorHandle.hpp>
#include <backendsCommon/Workload.hpp>

namespace armnn
{

class RefTransposeConvolution2dWorkload : public BaseWorkload<TransposeConvolution2dQueueDescriptor>
{
public:
    RefTransposeConvolution2dWorkload(const TransposeConvolution2dQueueDescriptor& descriptor,
                                      const WorkloadInfo& info);
    ~RefTransposeConvolution2dWorkload() = default;

    void PostAllocationConfigure() override;

    void Execute() const override;

private:
    std::unique_ptr<ScopedCpuTensorHandle> m_Weights;
    std::unique_ptr<ScopedCpuTensorHandle> m_Biases;

    std::unique_ptr<Decoder<float>> m_InputDecoder;
    std::unique_ptr<Encoder<float>> m_OutputEncoder;

    std::unique_ptr<Decoder<float>> m_WeightsDecoder;
    std::unique_ptr<Decoder<float>> m_BiasesDecoder;

    TensorShape m_InputShape;
    TensorShape m_OutputShape;
    TensorShape m_WeightsShape;
};

} // namespace armnn