[all-commits] [llvm/llvm-project] 3f1e82: [mlir] Linalg : do not forward memrefs to outputs ...

Eugene Zhulenev via All-commits all-commits at lists.llvm.org
Wed Apr 21 16:39:27 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3f1e827abd7fb893f7a33f467126d5d736ffa8d4
      https://github.com/llvm/llvm-project/commit/3f1e827abd7fb893f7a33f467126d5d736ffa8d4
  Author: Eugene Zhulenev <ezhulenev at google.com>
  Date:   2021-04-21 (Wed, 21 Apr 2021)

  Changed paths:
    M mlir/lib/Dialect/Linalg/Transforms/Bufferize.cpp
    M mlir/test/Dialect/Linalg/bufferize.mlir

  Log Message:
  -----------
  [mlir] Linalg : do not forward memrefs to outputs when do bufferization

Example:
```
%0 = linalg.init_tensor : tensor<...>
%1 = linalg.generic ... outs(%0: tensor<...>)
%2 = linalg.generic ... outs(%0: tensor<...>)
```

Memref allocated as a result of `init_tensor` bufferization can be incorrectly overwritten by the second linalg.generic operation

Reviewed By: silvas

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




More information about the All-commits mailing list