[all-commits] [llvm/llvm-project] b7b6d5: [mlir][vector] Add vector.transpose with unit-dim ...

Cullen Rhodes via All-commits all-commits at lists.llvm.org
Wed Nov 15 06:14:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b7b6d54004ef8a89dc3bad411f11a1ef93319a13
      https://github.com/llvm/llvm-project/commit/b7b6d54004ef8a89dc3bad411f11a1ef93319a13
  Author: Cullen Rhodes <cullen.rhodes at arm.com>
  Date:   2023-11-15 (Wed, 15 Nov 2023)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/LowerVectorTranspose.cpp
    M mlir/test/Dialect/Vector/vector-transpose-lowering.mlir

  Log Message:
  -----------
  [mlir][vector] Add vector.transpose with unit-dim to vector.shape_cast pattern (#72105)

This patch extends the vector.transpose lowering to replace:

vector.transpose %0, [1, 0] : vector<nx1x<eltty>> to vector<1xnx<eltty>>

with:

  vector.shape_cast %0 : vector<nx1x<eltty>> to vector<1xnx<eltty>>

Source with leading unit-dim (inverse) is also replaced. Unit dim must
be fixed. Non-unit dim can be scalable.

A check is also added to bail out for scalable vectors before unrolling.




More information about the All-commits mailing list