diff options
| author | Matthias Springer <me@m-sp.org> | 2024-07-01 19:00:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-01 19:00:21 +0200 |
| commit | cf9b77a636e0e92b1f4cafd99aaff394f4773f08 (patch) | |
| tree | bce936f41f3a580951bf2b05d2763163fc24cd07 /lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py | |
| parent | becc238f77ee2b95b5cdfc2d060fe6ff5b6e447d (diff) | |
[mlir][bufferization] Fix bug in bufferization of elementwise ops (#97209)
There is an optimization in One-Shot Bufferize wrt. ops that bufferize
to elementwise access. A copy can sometimes be avoided. E.g.:
```
%0 = tensor.empty()
%1 = tensor.fill ...
%2 = linalg.map ins(%1, ...) outs(%1)
```
In the above example, a buffer copy is not needed for %1, even though
the same buffer is read/written by two different operands (of the same
op). That's because the op bufferizes to elementwise access.
```c++
// Two equivalent operands of the same op are not conflicting if the op
// bufferizes to element-wise access. I.e., all loads at a position
// happen before all stores to the same position.
```
This optimization cannot be applied when op dominance cannot be used to
rule out conflicts. E.g., when the `linalg.map` is inside of a loop. In
such a case, the reads/writes happen multiple times and it is not
guaranteed that "all loads at a position happen before all stores to the
same position."
Fixes #90019.
Diffstat (limited to 'lldb/test/API/functionalities/plugins/python_os_plugin/TestPythonOSPlugin.py')
0 files changed, 0 insertions, 0 deletions
