From 1299496996bc332f02218f926640a9255ed60310 Mon Sep 17 00:00:00 2001 From: Mike Kelly Date: Thu, 21 Apr 2022 11:57:09 +0100 Subject: IVGCVSW-6806 Add Unidirectional Sequence Lstm support to Neon * Corrected TensorInfo order for IsUnidirectionalSequenceLstmSupported * outputStateOut TensorInfo is not optional. * cellStateOut TensorInfo is not optional. * TensorInfo Order matches other QLSTM/LSTM layers. * Added missing parameters to UnidirectionalSequenceLstmOperator for delegate. * Added quantized UnidirectionalSequenceLstm support to Neon !android-nn-driver:7457 Signed-off-by: Mike Kelly Change-Id: I26dde1bb96793dd25eb9081ca5ae5f63752288c4 --- src/armnnDeserializer/Deserializer.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/armnnDeserializer/Deserializer.cpp') diff --git a/src/armnnDeserializer/Deserializer.cpp b/src/armnnDeserializer/Deserializer.cpp index 75c60cc906..93fa99dcc3 100644 --- a/src/armnnDeserializer/Deserializer.cpp +++ b/src/armnnDeserializer/Deserializer.cpp @@ -3616,7 +3616,7 @@ void IDeserializer::DeserializerImpl::ParseUnidirectionalSequenceLstm(GraphPtr g CHECK_VALID_SIZE(inputs.size(), 3); auto outputs = GetOutputs(graph, layerIndex); - CHECK_VALID_SIZE(outputs.size(), 1); + CHECK_VALID_SIZE(outputs.size(), 3); auto flatBufferLayer = graph->layers()->Get(layerIndex)->layer_as_UnidirectionalSequenceLstmLayer(); auto layerName = GetLayerName(graph, layerIndex); @@ -3714,8 +3714,14 @@ void IDeserializer::DeserializerImpl::ParseUnidirectionalSequenceLstm(GraphPtr g lstmInputParams, layerName.c_str()); - armnn::TensorInfo outputTensorInfo1 = ToTensorInfo(outputs[0]); - layer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo1); + armnn::TensorInfo outputTensorInfo0 = ToTensorInfo(outputs[0]); + layer->GetOutputSlot(0).SetTensorInfo(outputTensorInfo0); + + armnn::TensorInfo outputTensorInfo1 = ToTensorInfo(outputs[1]); + layer->GetOutputSlot(1).SetTensorInfo(outputTensorInfo1); + + armnn::TensorInfo outputTensorInfo2 = ToTensorInfo(outputs[2]); + layer->GetOutputSlot(2).SetTensorInfo(outputTensorInfo2); RegisterInputSlots(graph, layerIndex, layer); RegisterOutputSlots(graph, layerIndex, layer); -- cgit v1.2.1