[Mlir-commits] [mlir] [MLIR][Linalg] Diagnose unsupported types in Linalg named op region builders (PR #181616)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Feb 16 06:12:44 PST 2026


================
@@ -6582,13 +6593,20 @@ void BatchReduceMatmulOp::regionBuilder(
   SmallVector<Value> yields;
 
   auto toType = block.getArgument(2).getType();
-  Value castValA =
-      helper.buildTypeFn(TypeFn::cast_signed, toType, block.getArgument(0));
-  Value castValB =
-      helper.buildTypeFn(TypeFn::cast_signed, toType, block.getArgument(1));
-  Value mulVal = helper.buildBinaryFn(BinaryFn::mul, castValA, castValB);
+  Value castValA = helper.buildTypeFn(TypeFn::cast_signed, toType,
+                                      block.getArgument(0), emitError);
+  Value castValB = helper.buildTypeFn(TypeFn::cast_signed, toType,
+                                      block.getArgument(1), emitError);
+  if (!castValA || !castValB)
----------------
shubhamnarlawar wrote:

Done. Merged all checks of MatMul builder into one whose result is being fed to add builder for all 3 operations - MatmulOp, BatchReduceMatmulOp and BatchMatmulOp. 

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


More information about the Mlir-commits mailing list