Skip to content

Commit

Permalink
[LPT] Recurrent Cell Transformation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eshoguli committed Sep 30, 2023
1 parent c7bd2b7 commit 17bb656
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<ov::opset1::FakeQuantize>(lstm_parent)) {
Expand All @@ -108,7 +109,7 @@ bool RecurrentCellTransformation::transform(TransformationContext& context, ov::
? defaultPrecisions
: precisionsAttribute.as<PrecisionsAttribute>().value();
const DataPrecision dataPrecision = getDataPrecision(lstm_parent, quantizationDetails, precisions);
if (dataPrecision.empty()) {
if (dataPrecision.empty() || dataPrecision.hasZeroPoint) {
return false;
}

Expand Down Expand Up @@ -148,6 +149,7 @@ bool RecurrentCellTransformation::transform(TransformationContext& context, ov::
continue;
}
}

return true;
}

Expand Down

0 comments on commit 17bb656

Please sign in to comment.