[Mlir-commits] [mlir] [mlir][linalg] Propagate filter tensor encoding in im2col (PR #160099)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed Sep 24 09:37:15 PDT 2025
================
@@ -435,9 +441,15 @@ rewriteInIm2Col(RewriterBase &rewriter, linalg::Conv2DNchwFchwOp convOp) {
auto loc = convOp.getLoc();
MLIRContext *context = rewriter.getContext();
+ if (!isa<RankedTensorType>(filterType))
+ return rewriter.notifyMatchFailure(
+ convOp, "expected filter type to be a ranked tensor");
----------------
fabrizio-indirli wrote:
I added a check at the beginning of the function to be sure that the op has tensor semantics, since the remainder of the function assumes it (e.g. we create `tensor::CollapseShape` and `tensor::Empty` ops), and I converted these lines into assertions as suggested.
https://github.com/llvm/llvm-project/pull/160099
More information about the Mlir-commits
mailing list