67 : ClBaseWorkload<QuantizedLstmQueueDescriptor>(descriptor, info)
69 m_InputToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
70 BuildArmComputeTensor(*m_InputToInputWeightsTensor,
m_Data.m_InputToInputWeights->GetTensorInfo());
72 m_InputToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
73 BuildArmComputeTensor(*m_InputToForgetWeightsTensor,
m_Data.m_InputToForgetWeights->GetTensorInfo());
75 m_InputToCellWeightsTensor = std::make_unique<arm_compute::CLTensor>();
76 BuildArmComputeTensor(*m_InputToCellWeightsTensor,
m_Data.m_InputToCellWeights->GetTensorInfo());
78 m_InputToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
79 BuildArmComputeTensor(*m_InputToOutputWeightsTensor,
m_Data.m_InputToOutputWeights->GetTensorInfo());
81 m_RecurrentToInputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
82 BuildArmComputeTensor(*m_RecurrentToInputWeightsTensor,
m_Data.m_RecurrentToInputWeights->GetTensorInfo());
84 m_RecurrentToForgetWeightsTensor = std::make_unique<arm_compute::CLTensor>();
85 BuildArmComputeTensor(*m_RecurrentToForgetWeightsTensor,
m_Data.m_RecurrentToForgetWeights->GetTensorInfo());
87 m_RecurrentToCellWeightsTensor = std::make_unique<arm_compute::CLTensor>();
88 BuildArmComputeTensor(*m_RecurrentToCellWeightsTensor,
m_Data.m_RecurrentToCellWeights->GetTensorInfo());
90 m_RecurrentToOutputWeightsTensor = std::make_unique<arm_compute::CLTensor>();
91 BuildArmComputeTensor(*m_RecurrentToOutputWeightsTensor,
m_Data.m_RecurrentToOutputWeights->GetTensorInfo());
93 m_InputGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
94 BuildArmComputeTensor(*m_InputGateBiasTensor,
m_Data.m_InputGateBias->GetTensorInfo());
96 m_ForgetGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
97 BuildArmComputeTensor(*m_ForgetGateBiasTensor,
m_Data.m_ForgetGateBias->GetTensorInfo());
99 m_CellBiasTensor = std::make_unique<arm_compute::CLTensor>();
100 BuildArmComputeTensor(*m_CellBiasTensor,
m_Data.m_CellBias->GetTensorInfo());
102 m_OutputGateBiasTensor = std::make_unique<arm_compute::CLTensor>();
103 BuildArmComputeTensor(*m_OutputGateBiasTensor,
m_Data.m_OutputGateBias->GetTensorInfo());
105 const arm_compute::ICLTensor& inputTensor =
static_cast<IClTensorHandle*
>(
m_Data.
m_Inputs[0])->GetTensor();
106 arm_compute::ICLTensor& cellStateInTensor =
static_cast<IClTensorHandle*
>(
m_Data.
m_Inputs[1])->GetTensor();
107 const arm_compute::ICLTensor& outputStateInTensor =
static_cast<IClTensorHandle*
>(
m_Data.
m_Inputs[2])->GetTensor();
109 arm_compute::ICLTensor& cellStateOutTensor =
static_cast<IClTensorHandle*
>(
m_Data.
m_Outputs[0])->GetTensor();
110 arm_compute::ICLTensor& outputStateOutTensor =
static_cast<IClTensorHandle*
>(
m_Data.
m_Outputs[1])->GetTensor();
114 m_QuantizedLstmLayer.configure(clCompileContext, &inputTensor, m_InputToInputWeightsTensor.get(),
115 m_InputToForgetWeightsTensor.get(),
116 m_InputToCellWeightsTensor.get(), m_InputToOutputWeightsTensor.get(),
117 m_RecurrentToInputWeightsTensor.get(), m_RecurrentToForgetWeightsTensor.get(),
118 m_RecurrentToCellWeightsTensor.get(), m_RecurrentToOutputWeightsTensor.get(),
119 m_InputGateBiasTensor.get(), m_ForgetGateBiasTensor.get(),
120 m_CellBiasTensor.get(),
121 m_OutputGateBiasTensor.get(), &cellStateInTensor, &outputStateInTensor,
122 &cellStateOutTensor, &outputStateOutTensor);
138 m_QuantizedLstmLayer.prepare();
#define ARMNN_SCOPED_PROFILING_EVENT_CL_NAME_GUID(label)
Creates a profiling event that uses GetGuid() and GetName() from the calling class.
void InitializeArmComputeClTensorData(arm_compute::CLTensor &clTensor, const ConstTensorHandle *handle)
std::vector< ITensorHandle * > m_Inputs
std::vector< ITensorHandle * > m_Outputs