[Mlir-commits] [mlir] [mlir][tosa] Change Rescale zero points to be inputs (PR #130340)
Luke Hutton
llvmlistbot at llvm.org
Mon Mar 10 03:25:16 PDT 2025
================
@@ -1491,11 +1490,26 @@ class RescaleConverter : public OpRewritePattern<tosa::RescaleOp> {
// later.
int32_t inBitwidth = valueTy.getIntOrFloatBitWidth() > 32 ? 48 : 32;
- auto inputZp = createConstFromIntAttribute<int32_t>(
- op, "input_zp", nestedBuilder.getIntegerType(inBitwidth),
+ FailureOr<int64_t> maybeIZp = op.getInputZeroPoint();
+ if (failed(maybeIZp)) {
+ (void)rewriter.notifyMatchFailure(
----------------
lhutton1 wrote:
nit: is it possible to return match failure directly?
https://github.com/llvm/llvm-project/pull/130340
More information about the Mlir-commits
mailing list