[Mlir-commits] [mlir] [mlir][linalg] Relax structured op region filler check (PR #123741)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Jan 21 09:07:33 PST 2025


================
@@ -121,14 +121,11 @@ using RegionBuilderFn = llvm::function_ref<void(ImplicitLocOpBuilder &, Block &,
 /// `regionBuilder`. The method is used by both named structured ops created by
 /// ods-gen and by manually defined C++ ops. It is called by both builders and
 /// parsers and creates a block with arguments corresponding to the elemental
-/// types of `inputTypes` and `outputTypes`. All output types are asserted to be
-/// ShapedType.
+/// types of `inputTypes` and `outputTypes`.
 static void fillStructuredOpRegion(OpBuilder &opBuilder, Region &region,
                                    TypeRange inputTypes, TypeRange outputTypes,
                                    ArrayRef<NamedAttribute> attrs,
                                    RegionBuilderFn regionBuilder) {
-  assert(llvm::all_of(outputTypes, llvm::IsaPred<ShapedType>));
----------------
MaheshRavishankar wrote:

Maybe its an ordering thing. It might be better to trigger the check before calling this method and just leave the assert as a developer hint (and add an assert message)?

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


More information about the Mlir-commits mailing list