ArmNN
 25.11
Loading...
Searching...
No Matches
RefQLstmWorkload.hpp
Go to the documentation of this file.
1//
2// Copyright © 2022, 2024 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6#pragma once
7
9
10#include "RefBaseWorkload.hpp"
12
13namespace armnn
14{
15
16class RefQLstmWorkload : public RefBaseWorkload<QLstmQueueDescriptor>
17{
18public:
19 explicit RefQLstmWorkload(const QLstmQueueDescriptor& descriptor, const WorkloadInfo& info);
20
21 void Execute() const override;
22
23private:
24 void Execute(std::vector<ITensorHandle*> inputs, std::vector<ITensorHandle*> outputs) const;
25 std::unique_ptr<ScopedTensorHandle> m_InputToInputWeightsTensor;
26 std::unique_ptr<ScopedTensorHandle> m_InputToForgetWeightsTensor;
27 std::unique_ptr<ScopedTensorHandle> m_InputToCellWeightsTensor;
28 std::unique_ptr<ScopedTensorHandle> m_InputToOutputWeightsTensor;
29
30 std::unique_ptr<ScopedTensorHandle> m_RecurrentToInputWeightsTensor;
31 std::unique_ptr<ScopedTensorHandle> m_RecurrentToForgetWeightsTensor;
32 std::unique_ptr<ScopedTensorHandle> m_RecurrentToCellWeightsTensor;
33 std::unique_ptr<ScopedTensorHandle> m_RecurrentToOutputWeightsTensor;
34
35 std::unique_ptr<ScopedTensorHandle> m_CellToInputWeightsTensor;
36 std::unique_ptr<ScopedTensorHandle> m_CellToForgetWeightsTensor;
37 std::unique_ptr<ScopedTensorHandle> m_CellToOutputWeightsTensor;
38
39 std::unique_ptr<ScopedTensorHandle> m_InputGateBiasTensor;
40 std::unique_ptr<ScopedTensorHandle> m_ForgetGateBiasTensor;
41 std::unique_ptr<ScopedTensorHandle> m_CellBiasTensor;
42 std::unique_ptr<ScopedTensorHandle> m_OutputGateBiasTensor;
43
44 std::unique_ptr<ScopedTensorHandle> m_ProjectionWeightsTensor;
45 std::unique_ptr<ScopedTensorHandle> m_ProjectionBiasTensor;
46
47 std::unique_ptr<ScopedTensorHandle> m_InputLayerNormWeightsTensor;
48 std::unique_ptr<ScopedTensorHandle> m_ForgetLayerNormWeightsTensor;
49 std::unique_ptr<ScopedTensorHandle> m_CellLayerNormWeightsTensor;
50 std::unique_ptr<ScopedTensorHandle> m_OutputLayerNormWeightsTensor;
51
52 float m_LayerNormEpsilon = static_cast<float>(1e-8);
53};
54
55} //namespace armnn
RefBaseWorkload(const QLstmQueueDescriptor &descriptor, const WorkloadInfo &info)
RefQLstmWorkload(const QLstmQueueDescriptor &descriptor, const WorkloadInfo &info)
void Execute() const override
Copyright (c) 2021 ARM Limited and Contributors.
Contains information about TensorInfos of a layer.