From 17bb6567cd169a05a69fb745bb32e70069ceb63d Mon Sep 17 00:00:00 2001 From: eshoguli Date: Sun, 1 Oct 2023 00:19:24 +0100 Subject: [PATCH] [LPT] Recurrent Cell Transformation fix --- .../low_precision_transformations/src/recurrent_cell.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/low_precision_transformations/src/recurrent_cell.cpp b/src/common/low_precision_transformations/src/recurrent_cell.cpp index f5d68470643eaf..7fd40cf2071a0f 100644 --- a/src/common/low_precision_transformations/src/recurrent_cell.cpp +++ b/src/common/low_precision_transformations/src/recurrent_cell.cpp @@ -96,6 +96,7 @@ bool RecurrentCellTransformation::transform(TransformationContext& context, ov:: if (!canBeTransformed(context, lstm)) { return false; } + for (size_t parentIndex = 0ul; parentIndex < lstm->get_input_size(); parentIndex++) { auto lstm_parent = lstm->get_input_node_shared_ptr(parentIndex); if (is_type(lstm_parent)) { @@ -108,7 +109,7 @@ bool RecurrentCellTransformation::transform(TransformationContext& context, ov:: ? defaultPrecisions : precisionsAttribute.as().value(); const DataPrecision dataPrecision = getDataPrecision(lstm_parent, quantizationDetails, precisions); - if (dataPrecision.empty()) { + if (dataPrecision.empty() || dataPrecision.hasZeroPoint) { return false; } @@ -148,6 +149,7 @@ bool RecurrentCellTransformation::transform(TransformationContext& context, ov:: continue; } } + return true; }