[Mlir-commits] [mlir] [mlir][tosa] Move ResizeOp shape checks from verifier to tosa-validate (PR #234101)

Luke Hutton llvmlistbot at llvm.org
Fri Oct 23 01:26:51 PDT 2026


================
@@ -608,6 +608,14 @@ struct TosaValidation : public tosa::impl::TosaValidationBase<TosaValidation> {
       const int64_t scaleYD = scale[1];
       const int64_t scaleXN = scale[2];
       const int64_t scaleXD = scale[3];
+
+      // Invalid (non-positive) scale values are reported by the ERROR_IF
+      // check in applyErrorIfCheck(). Skip the level ratio check here to
+      // avoid dividing by a non-positive value and reporting a misleading
+      // level error for an already-invalid scale.
+      if (llvm::any_of(scale, [](int64_t s) { return s <= 0; }))
+        return success();
----------------
lhutton1 wrote:

Thanks, could we add a test for this?

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


More information about the Mlir-commits mailing list