diff options
| author | Renato Golin <rengolin@systemcall.eu> | 2025-08-08 22:20:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-08 22:20:27 +0100 |
| commit | d15280894bd03c618ec1b4debcbfdb1fecb81594 (patch) | |
| tree | 6c1395dcca268f9ef45c459f529be5283bb8460a /mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp | |
| parent | 5a009838a23d14fe61f042e43bd0b566d270067c (diff) | |
[MLIR][Linalg] Remove matmul_transpose variants (#147961)
Removes the `(batch_)matmul_transpose_{a|b}` variants from OpDSL and
replace it with `matmul affine_maps [...]` whenever appropriate. This is
in line with the
[plan](https://discourse.llvm.org/t/rfc-op-explosion-in-linalg/82863),
and can be done since #104783 merged.
See:
https://discourse.llvm.org/t/deprecate-batch-matmul-transpose-a-b-linalg-operations/87245
Issues investigated:
* pad transform tests that could use `matmul` instead, so change to
that.
* ArmSME test using transpose actually needed it, so changed to `matmul`
+ affine maps.
Arm tests validated by @banach-space (thanks!!).
Diffstat (limited to 'mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp')
| -rw-r--r-- | mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp index cf65e673a5c4..80fbe3cb9ff1 100644 --- a/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp +++ b/mlir/lib/Dialect/Linalg/Transforms/Vectorization.cpp @@ -2563,7 +2563,7 @@ vectorizeScalableVectorPrecondition(Operation *op, "vectorization"; return failure(); } - if (isa<linalg::MatmulOp>(op) || isa<linalg::MatmulTransposeAOp>(op)) { + if (isa<linalg::MatmulOp>(op)) { LDBG() << "Scalable vectorization of the reduction dim in Matmul-like ops " "is not supported"; @@ -2604,15 +2604,9 @@ vectorizeScalableVectorPrecondition(Operation *op, return failure(); } - // Check to not let go the matmul with extended semantic, through this - // transform. - if (linalgOp.hasUserDefinedMaps()) - return failure(); - // Cond 4: Only the following ops are supported in the // presence of scalable vectors return success(isElementwise(linalgOp) || isa<linalg::MatmulOp>(op) || - isa<linalg::MatmulTransposeAOp>(op) || isa<linalg::DepthwiseConv1DNwcWcOp>(op) || isa<linalg::MatvecOp>(op) || isa<linalg::Mmt4DOp>(op) || hasReductionIterator(linalgOp)); |
