diff options
author | Hanhan Wang <hanchung@google.com> | 2020-03-31 21:33:23 -0700 |
---|---|---|
committer | Hanhan Wang <hanchung@google.com> | 2020-03-31 21:33:50 -0700 |
commit | 6dd696ae4fa1b1564e76e5531c268724d2c8b98f (patch) | |
tree | f08a62d21a7544d28e45d2e69d573ae9a3b0d222 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 69ddee1d2aadaa0b9ac4549f366d1bf5701a65f0 (diff) | |
download | llvm-6dd696ae4fa1b1564e76e5531c268724d2c8b98f.zip llvm-6dd696ae4fa1b1564e76e5531c268724d2c8b98f.tar.gz llvm-6dd696ae4fa1b1564e76e5531c268724d2c8b98f.tar.bz2 |
[mlir][Linalg] Extend fusion to support WAW atm on buffers.
Summary:
The RAW fusion happens only if the produecer block dominates the consumer block.
The WAW pattern also works with the precondition. I.e., if a producer can
dominate the consumer, they can fairly fuse together.
Since they are all tilable, we can think the pattern like this way:
Input:
```
linalg_op1 view
tile_loop
subview_2
linalg_op2 subview_2
```
Tile the first Linalg op as same as the second Linalg.
```
tile_loop
subview_1
linalg_op1 subview_1
tile_loop
subview_2
liangl_op2 subview_2
```
Since the first Linalg op is tilable in the same way and the computation are
independently, it's fair to fuse it with the second Linalg op.
```
tile_loop
subview_1
linalg_op1 subview_1
linalg_op2 subview_2
```
In short, this patch includes:
- Handling both RAW and WAW pattern.
- Adding a interface method to get input and output buffers.
- Exposing a method to get a StringRef of a dependency type.
- Fixing existing WAW tests and add one more use case: initialize the buffer
before conv op.
Differential Revision: https://reviews.llvm.org/D76897
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions