[Mlir-commits] [mlir] [mlir][linalg] Enable CollapseLinalgDimensions to collapse linalg::CopyOp (PR #68526)
Aviad Cohen
llvmlistbot at llvm.org
Sun Oct 22 08:07:45 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,
----------------
AviadCo wrote:
Sorry, I don't understand it.
Whoever is planning to call this function can know in compile time that the type it uses as template is/isn't supported.
If we can catch bug in compilation time it is better than catch it during runtime.
Can you elaborate about ` static assert can cause deployment issues downstream`?
https://github.com/llvm/llvm-project/pull/68526
More information about the Mlir-commits
mailing list