[Mlir-commits] [mlir] Update `LowerContractionToSMMLAPattern` to ingnore matvec (PR #88288)

Kojo Acquah llvmlistbot at llvm.org
Wed Apr 10 10:06:31 PDT 2024


================
@@ -54,6 +54,8 @@ class LowerContractionToSMMLAPattern
     // Note: RHS is not transposed.
     mlir::VectorType lhsType = op.getLhsType();
     mlir::VectorType rhsType = op.getRhsType();
+    if (rhsType.getRank() < 2)
+      return failure();
----------------
KoolJBlack wrote:

I don't think `vector.contract` supports 0-D vectors. I couldn't create one without hitting errors: 
``` error: unexpected error: 'vector.contract' op operand #0 must be vector of any type values, but got 'vector<i32>'```

I did add "hasRank" check just in case. 

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


More information about the Mlir-commits mailing list