[all-commits] [llvm/llvm-project] 4d80ef: [mlir][bufferization] Ownership-based deallocation...
Matthias Springer via All-commits
all-commits at lists.llvm.org
Sun Oct 22 17:45:48 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4d80eff8615f3876d649ce00b26d1b69b213163b
https://github.com/llvm/llvm-project/commit/4d80eff8615f3876d649ce00b26d1b69b213163b
Author: Matthias Springer <me at m-sp.org>
Date: 2023-10-23 (Mon, 23 Oct 2023)
Changed paths:
M mlir/include/mlir/Dialect/Bufferization/IR/BufferizationBase.td
M mlir/lib/Dialect/Bufferization/IR/BufferizationDialect.cpp
M mlir/lib/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation.cpp
M mlir/test/Dialect/Bufferization/Transforms/OwnershipBasedBufferDeallocation/dealloc-memoryeffect-interface.mlir
M mlir/test/Dialect/Bufferization/invalid.mlir
Log Message:
-----------
[mlir][bufferization] Ownership-based deallocation: Allow manual (de)allocs (#68648)
Add a new attribute `bufferization.manual_deallocation` that can be
attached to allocation and deallocation ops. Buffers that are allocated
with this attribute are assigned an ownership of "false". Such buffers
can be deallocated manually (e.g., with `memref.dealloc`) if the
deallocation op also has the attribute set. Previously, the
ownership-based buffer deallocation pass used to reject IR with existing
deallocation ops. This is no longer the case if such ops have this new
attribute.
This change is useful for the sparse compiler, which currently
deallocates the sparse tensor buffers by itself.
More information about the All-commits
mailing list