[Mlir-commits] [mlir] [mlir][tosa] Add more informative error messages to block scaled types (PR #211569)

Sayan Saha llvmlistbot at llvm.org
Wed Aug 5 06:02:21 PDT 2026


================
@@ -141,9 +143,14 @@ Type getStorageElementTypeOrSelf(Type type);
 // Returns the storage element type for a given value
 Type getStorageElementTypeOrSelf(Value value);
 
-// Verify a block scaled tensor type is valid
-LogicalResult verifyBlockScaledTensorType(mlir::Type type,
-                                          bool allowScaleValues);
+// Verify that a given type is a valid block scaled tensor type
+LogicalResult verifyBlockScaledTensorType(
+    mlir::Type type,
+    llvm::function_ref<mlir::InFlightDiagnostic()> emitError = nullptr,
+    bool allowScaleValues = false);
+
+// Collect error messages for a given type
----------------
sahas3 wrote:

```suggestion
// Returns a diagnostic suffix string for a type verification failure, or empty string if the type is valid
```

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


More information about the Mlir-commits mailing list