From 1f294b0a3030e2cc269999bc93862a631a9fc38e Mon Sep 17 00:00:00 2001 From: eshoguli Date: Thu, 6 Jul 2023 18:45:56 +0100 Subject: [PATCH] [CPU] zero-point fix --- src/plugins/intel_cpu/src/graph_optimizer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/intel_cpu/src/graph_optimizer.cpp b/src/plugins/intel_cpu/src/graph_optimizer.cpp index 8952b09ea6f9af..ec4805a86406ee 100644 --- a/src/plugins/intel_cpu/src/graph_optimizer.cpp +++ b/src/plugins/intel_cpu/src/graph_optimizer.cpp @@ -756,8 +756,10 @@ void GraphOptimizer::FuseConvolutionAndZeroPoints(Graph &graph) { return false; } - auto subtractArg0 = parent0->getParentEdgesAtPort(0)[0]->getParent(); - if (subtractArg0->getOriginalOutputPrecisionAtPort(0) != Precision::U8) + const auto& parentEdge = parent0->getParentEdgeAt(0); + const auto& subtractArg0 = parentEdge->getParent(); + const size_t portNum = parentEdge->getInputNum(); + if (subtractArg0->getOriginalOutputPrecisionAtPort(portNum) != Precision::U8) return false; auto zeroPointsConstant = dynamic_cast(subtractArg1.get());