[all-commits] [llvm/llvm-project] da09b3: [Matrix] Optimize matrix transposes around additions

Visoiu Mistrih Francis via All-commits all-commits at lists.llvm.org
Wed Jan 11 15:23:03 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da09b35334aba76748a7531d96fd7e5ba1d66669
      https://github.com/llvm/llvm-project/commit/da09b35334aba76748a7531d96fd7e5ba1d66669
  Author: Francis Visoiu Mistrih <francisvm at yahoo.com>
  Date:   2023-01-11 (Wed, 11 Jan 2023)

  Changed paths:
    M llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp
    M llvm/test/Transforms/LowerMatrixIntrinsics/after-transpose-opts.ll
    M llvm/test/Transforms/LowerMatrixIntrinsics/propagate-backward.ll

  Log Message:
  -----------
  [Matrix] Optimize matrix transposes around additions

First, sink the transposes to the operands to simplify redudant
ones. Then, lift them to reduce the number of realized transposes.

```
(A + B)^T -> A^T + B^T -> (A + B)^T
```

See tests for more examples.

Differential Revision: https://reviews.llvm.org/D133657




More information about the All-commits mailing list