[all-commits] [llvm/llvm-project] 34df53: Revert "[mlir][Vector] Add fold transpose(shape_ca...

Adam Paszke via All-commits all-commits at lists.llvm.org
Wed Dec 6 02:16:01 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 34df53739af2ce0ffb2625075ee2e613b278969c
      https://github.com/llvm/llvm-project/commit/34df53739af2ce0ffb2625075ee2e613b278969c
  Author: Adam Paszke <apaszke at google.com>
  Date:   2023-12-06 (Wed, 06 Dec 2023)

  Changed paths:
    M mlir/lib/Dialect/Vector/IR/VectorOps.cpp
    M mlir/test/Dialect/Vector/canonicalize.mlir

  Log Message:
  -----------
  Revert "[mlir][Vector] Add fold transpose(shape_cast) -> shape_cast (#73951)" (#74579)

This reverts commit f42b7615b862bb5f77981f619f92877eb20adf54.

The fold pattern is incorrect, because it does not even look at the
permutation of non-unit dims and is happy to replace a pattern such as
```
%22 = vector.shape_cast %21 : vector<1x256x256xf32> to vector<256x256xf32>
%23 = vector.transpose %22, [1, 0] : vector<256x256xf32> to vector<256x256xf32>
```
with
```
%22 = vector.shape_cast %21 : vector<1x256x256xf32> to vector<256x256xf32>
```
which is obviously incorrect.




More information about the All-commits mailing list