[all-commits] [llvm/llvm-project] 6d88ac: [mlir][bufferization] Transfer `restrict` during e...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Wed Oct 11 08:51:30 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6d88ac11d7d7353beab83016a363d7542e0b020c
https://github.com/llvm/llvm-project/commit/6d88ac11d7d7353beab83016a363d7542e0b020c
Author: Matthias Springer <me at m-sp.org>
Date: 2023-10-11 (Wed, 11 Oct 2023)
Changed paths:
M mlir/include/mlir/Dialect/Bufferization/IR/BufferizationOps.td
M mlir/lib/Dialect/Bufferization/IR/BufferizationOps.cpp
M mlir/test/Dialect/Bufferization/Transforms/one-shot-bufferize-empty-tensor-elimination.mlir
M mlir/test/Dialect/Bufferization/invalid.mlir
Log Message:
-----------
[mlir][bufferization] Transfer `restrict` during empty tensor elimination (#68729)
Empty tensor elimination is looking for
`bufferization.materialize_in_destination` ops with a `tensor.empty`
source. It replaces the `tensor.empty` with a `bufferization.to_tensor
restrict` of the memref destination. As part of this rewrite, the
`restrict` keyword should be removed, so that no second `to_tensor
restrict` op will be inserted. Such IR would be invalid.
`bufferization.materialize_in_destination` with memref destination and
without the `restrict` attribute are ignored by empty tensor
elimination.
Also relax the verifier of `materialize_in_destination`. The `restrict`
keyword is not generally needed because the op does not expose the
buffer as a tensor.
More information about the All-commits
mailing list