[Mlir-commits] [mlir] [mlir][tosa] Change Rescale zero points to be inputs (PR #130340)

Tai Ly llvmlistbot at llvm.org
Mon Mar 10 09:46:52 PDT 2025


================
@@ -1708,6 +1729,38 @@ static LogicalResult verifyZeroPoint(T op, Value val, const int64_t &zp,
   return success();
 }
 
+static LogicalResult verifyZeroPoint(tosa::RescaleOp op, Value zpVal,
+                                     const int64_t &zp,
+                                     const std::string &operand) {
+  bool isInputZp = (zpVal == op.getInputZp());
+  bool isOutputZp = (zpVal == op.getOutputZp());
+  if (!isInputZp && !isOutputZp) {
+    return op.emitOpError("internal error: zero-point operand is neither "
----------------
Tai78641 wrote:

fixed

https://github.com/llvm/llvm-project/pull/130340


More information about the Mlir-commits mailing list