[Mlir-commits] [mlir] [MLIR] Refactor to create vectorization convOp precondition check (PR #130181)
Han-Chung Wang
llvmlistbot at llvm.org
Tue Mar 11 09:30:34 PDT 2025
================
@@ -3125,58 +3225,32 @@ bool isSupportedPoolKind(vector::CombiningKind kind) {
/// kw is unrolled, w is unrolled iff dilationW > 1.
struct Conv1DGenerator
: public StructuredGenerator<LinalgOp, utils::IteratorType> {
- Conv1DGenerator(RewriterBase &rewriter, LinalgOp linalgOp, int strideW,
- int dilationW)
- : StructuredGenerator<LinalgOp, utils::IteratorType>(rewriter, linalgOp),
- strideW(strideW), dilationW(dilationW) {
- // Determine whether `linalgOp` can be generated with this generator
- if (linalgOp.getNumDpsInputs() != 2 || linalgOp.getNumDpsInits() != 1)
- return;
+ Conv1DGenerator(RewriterBase &rewriter, LinalgOp linalgOp)
+ : StructuredGenerator<LinalgOp, utils::IteratorType>(rewriter, linalgOp) {
+
lhsShaped = linalgOp.getDpsInputOperand(0)->get();
rhsShaped = linalgOp.getDpsInputOperand(1)->get();
resShaped = linalgOp.getDpsInitOperand(0)->get();
lhsShapedType = dyn_cast<ShapedType>(lhsShaped.getType());
rhsShapedType = dyn_cast<ShapedType>(rhsShaped.getType());
resShapedType = dyn_cast<ShapedType>(resShaped.getType());
----------------
hanhanW wrote:
Oh, I see. I did not notice it. Thanks!
https://github.com/llvm/llvm-project/pull/130181
More information about the Mlir-commits
mailing list