[all-commits] [llvm/llvm-project] 2eb9e3: [mlir][Vector] Update patterns for flattening vect...

Andrzej Warzyński via All-commits all-commits at lists.llvm.org
Tue Dec 5 00:36:12 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2eb9e33cc57d5acc2232d468a99f0e35c8f583dc
      https://github.com/llvm/llvm-project/commit/2eb9e33cc57d5acc2232d468a99f0e35c8f583dc
  Author: Andrzej Warzyński <andrzej.warzynski at arm.com>
  Date:   2023-12-05 (Tue, 05 Dec 2023)

  Changed paths:
    M mlir/lib/Dialect/Vector/Transforms/VectorTransferOpTransforms.cpp
    M mlir/lib/Dialect/Vector/Utils/VectorUtils.cpp
    M mlir/test/Dialect/Vector/vector-transfer-flatten.mlir
    M mlir/test/lib/Dialect/Vector/TestVectorTransforms.cpp

  Log Message:
  -----------
  [mlir][Vector] Update patterns for flattening vector.xfer Ops (2/N) (#73523)

Updates patterns for flattening `vector.transfer_read` by relaxing the
requirement that the "collapsed" indices are all zero. This enables
collapsing cases like this one:

```mlir
  %2 = vector.transfer_read %arg4[%c0, %arg0, %arg1, %c0] ... :
    memref<1x43x4x6xi32>, vector<1x2x6xi32>
```

Previously only the following case would be consider for collapsing
(all indices are 0):

```mlir
  %2 = vector.transfer_read %arg4[%c0, %c0, %c0, %c0] ... :
    memref<1x43x4x6xi32>, vector<1x2x6xi32>
```

Also adds some new comments and renames the `firstContiguousInnerDim`
parameter as `firstDimToCollapse` (the latter better matches the actual
meaning).

Similar updates for `vector.transfer_write` will be implemented in a
follow-up patch.




More information about the All-commits mailing list