[Mlir-commits] [mlir] [mlir][linalg] Enable CollapseLinalgDimensions to collapse linalg::CopyOp (PR #68526)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Oct 17 12:54:36 PDT 2023
================
@@ -1439,41 +1440,100 @@ void generateCollapsedIndexingRegion(Location loc, Block *block,
}
}
+template <typename LinalgType>
+Operation *createCollapsedOp(LinalgType op,
+ const CollapsingInfo &collapsingInfo,
+ RewriterBase &rewriter) {
+ static_assert(llvm::is_one_of<LinalgType, GenericOp, CopyOp>::value,
----------------
MaheshRavishankar wrote:
`static_asserts` create problems in deployment. This is an optimization, not required for correctness. It is completely reasonable to have an operation not collapse and optimization to return a failure. The caller can then handle appropriately. Please change to fail gracefully.
https://github.com/llvm/llvm-project/pull/68526
More information about the Mlir-commits
mailing list