Skip to content

Commit

Permalink
Apply suggestion from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
jorickert committed Feb 22, 2025
1 parent f361619 commit 987183a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/Dialect/XTenNN/Transforms/QDQConcat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,16 @@ struct RemoveQDQBetweenConcat : public OpRewritePattern<DequantizeOp> {
op, "DequantizeOp input not produced by QuantizeOp.");
}

if (quantize.getScale() != op.getScale() ||
quantize.getZeroPoint() != op.getZeroPoint()) {
if (quantize.getScale() != op.getScale()) {
return rewriter.notifyMatchFailure(op,
"DequantizeOp and QuantizeOp do not "
"share the same scale + zero_point.");
"share the same scale");
}

if (quantize.getZeroPoint() != op.getZeroPoint()) {
return rewriter.notifyMatchFailure(op,
"DequantizeOp and QuantizeOp do not "
"share the same zero_point.");
}

// Try to match an incoming concat
Expand Down

0 comments on commit 987183a

Please sign in to comment.