[all-commits] [llvm/llvm-project] 03bd0f: [mlir][vector] Remove MatrixMultiplyOp and FlatTra...

Andrzej Warzyński via All-commits all-commits at lists.llvm.org
Mon Jul 21 00:19:51 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 03bd0f36ba1c35c9dfbdc3d021e73940a18a6cf9
      https://github.com/llvm/llvm-project/commit/03bd0f36ba1c35c9dfbdc3d021e73940a18a6cf9
  Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
  Date:   2025-07-21 (Mon, 21 Jul 2025)

  Changed paths:
    M mlir/include/mlir/Conversion/VectorToLLVM/ConvertVectorToLLVM.h
    M mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
    M mlir/include/mlir/Dialect/Vector/Transforms/LoweringPatterns.h
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVM.cpp
    M mlir/lib/Conversion/VectorToLLVM/ConvertVectorToLLVMPass.cpp
    M mlir/lib/Dialect/Arith/Transforms/EmulateUnsupportedFloats.cpp
    M mlir/lib/Dialect/Vector/Transforms/LowerVectorContract.cpp
    M mlir/lib/Dialect/Vector/Transforms/LowerVectorTranspose.cpp
    M mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
    M mlir/test/Dialect/Vector/invalid.mlir
    M mlir/test/Dialect/Vector/ops.mlir
    M mlir/test/Dialect/Vector/vector-contract-to-matrix-intrinsics-transforms.mlir
    M mlir/test/Dialect/Vector/vector-transpose-lowering.mlir
    A mlir/test/Dialect/Vector/vector-transpose-to-matrix-intrinsics-transform.mlir
    M mlir/test/Integration/Dialect/Vector/CPU/flat-transpose-col.mlir
    M mlir/test/Integration/Dialect/Vector/CPU/flat-transpose-row.mlir
    M mlir/test/Integration/Dialect/Vector/CPU/matrix-multiply-col.mlir
    M mlir/test/Integration/Dialect/Vector/CPU/matrix-multiply-row.mlir

  Log Message:
  -----------
  [mlir][vector] Remove MatrixMultiplyOp and FlatTransposeOp from Vector dialect (#144307)

This patch deletes `vector.matrix_multiply` and `vector.flat_transpose`,
which are thin wrappers around the corresponding LLVM intrinsics:
  - `llvm.intr.matrix.multiply`
  - `llvm.intr.matrix.transpose`

These Vector dialect ops did not provide additional semantics or
abstraction beyond the LLVM intrinsics. Their removal simplifies the
lowering pipeline without losing any functionality.

The lowering chains:
- `vector.contract` → `vector.matrix_multiply` →
`llvm.intr.matrix.multiply`
- `vector.transpose` → `vector.flat_transpose` →
`llvm.intr.matrix.transpose`

are now replaced with:
  - `vector.contract` → `llvm.intr.matrix.multiply`
  - `vector.transpose` → `llvm.intr.matrix.transpose`

This was accomplished by directly replacing:
  - `vector::MatrixMultiplyOp` with `LLVM::MatrixMultiplyOp`
  - `vector::FlatTransposeOp` with `LLVM::MatrixTransposeOp`

Note: To avoid a build-time dependency from `Vector` to `LLVM`,
relevant transformations are moved from "Vector/Transforms" to
`Conversion/VectorToLLVM`.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list