13 #include <arm_compute/graph/Tensor.h>
14 #include <arm_compute/runtime/CL/functions/CLLSTMLayer.h>
15 #include <arm_compute/runtime/CL/functions/CLPermute.h>
16 #include <arm_compute/runtime/CL/functions/CLSplit.h>
17 #include <arm_compute/runtime/CL/functions/CLConcatenateLayer.h>
27 const arm_compute::CLCompileContext& clCompileContext);
28 virtual void Execute()
const override;
37 mutable std::unique_ptr<arm_compute::CLPermute> m_Permute1;
38 mutable std::unique_ptr<arm_compute::IFunction> m_Splitter;
39 mutable std::vector<std::unique_ptr<arm_compute::CLLSTMLayer>> m_Layers;
40 mutable std::unique_ptr<arm_compute::CLConcatenateLayer> m_Concat;
42 mutable std::unique_ptr<arm_compute::CLPermute> m_Permute2;
47 std::unique_ptr<arm_compute::CLTensor> m_InputToInputWeightsTensor;
48 std::unique_ptr<arm_compute::CLTensor> m_InputToForgetWeightsTensor;
49 std::unique_ptr<arm_compute::CLTensor> m_InputToCellWeightsTensor;
50 std::unique_ptr<arm_compute::CLTensor> m_InputToOutputWeightsTensor;
51 std::unique_ptr<arm_compute::CLTensor> m_RecurrentToInputWeightsTensor;
52 std::unique_ptr<arm_compute::CLTensor> m_RecurrentToForgetWeightsTensor;
53 std::unique_ptr<arm_compute::CLTensor> m_RecurrentToCellWeightsTensor;
54 std::unique_ptr<arm_compute::CLTensor> m_RecurrentToOutputWeightsTensor;
55 std::unique_ptr<arm_compute::CLTensor> m_CellToInputWeightsTensor;
56 std::unique_ptr<arm_compute::CLTensor> m_CellToForgetWeightsTensor;
57 std::unique_ptr<arm_compute::CLTensor> m_CellToOutputWeightsTensor;
58 std::unique_ptr<arm_compute::CLTensor> m_InputGateBiasTensor;
59 std::unique_ptr<arm_compute::CLTensor> m_ForgetGateBiasTensor;
60 std::unique_ptr<arm_compute::CLTensor> m_CellBiasTensor;
61 std::unique_ptr<arm_compute::CLTensor> m_OutputGateBiasTensor;
62 std::unique_ptr<arm_compute::CLTensor> m_ProjectionWeightsTensor;
63 std::unique_ptr<arm_compute::CLTensor> m_ProjectionBiasTensor;
65 std::unique_ptr<arm_compute::CLTensor> m_ScratchBuffer;
67 std::unique_ptr<arm_compute::CLTensor> m_InputLayerNormWeightsTensor;
68 std::unique_ptr<arm_compute::CLTensor> m_ForgetLayerNormWeightsTensor;
69 std::unique_ptr<arm_compute::CLTensor> m_CellLayerNormWeightsTensor;
70 std::unique_ptr<arm_compute::CLTensor> m_OutputLayerNormWeightsTensor;
76 arm_compute::CLTensor m_PermuteFirstOut;
77 std::vector<arm_compute::CLTensor> m_SplitterOutputsTensors;
78 std::vector<arm_compute::CLTensor> m_ConcatInputsTensors;
79 std::vector<arm_compute::ICLTensor*> m_SplitterOutputs;
80 std::vector<const arm_compute::ICLTensor*> m_ConcatInputs;
81 arm_compute::CLTensor concat_out;
83 void FreeUnusedTensors();