llvm-project/mlir
Matthias Springer c66303c287 [mlir][sparse] Switch to One-Shot Bufferize
This change removes the partial bufferization passes from the sparse compilation pipeline and replaces them with One-Shot Bufferize. One-Shot Analysis (and TensorCopyInsertion) is used to resolve all out-of-place bufferizations, dense and sparse. Dense ops are then bufferized with BufferizableOpInterface. Sparse ops are still bufferized in the Sparsification pass.

Details:
* Dense allocations are automatically deallocated, unless they are yielded from a block. (In that case the alloc would leak.) All test cases are modified accordingly. E.g., some funcs now have an "out" tensor argument that is returned from the function. (That way, the allocation happens at the call site.)
* Sparse allocations are *not* automatically deallocated. They must be "released" manually. (No change, this will be addressed in a future change.)
* Sparse tensor copies are not supported yet. (Future change)
* Sparsification no longer has to consider inplacability. If necessary, allocations and/or copies are inserted during TensorCopyInsertion. All tensors are inplaceable by the time Sparsification is running. Instead of marking a tensor as "not inplaceable", it can be marked as "not writable", which will trigger an allocation and/or copy during TensorCopyInsertion.

Differential Revision: https://reviews.llvm.org/D129356
2022-07-14 09:52:48 +02:00
..
benchmark/python [mlir] Fix declaration of nano time function in benchmark infra 2022-05-13 13:22:18 +02:00
cmake/modules Restore Python install behavior from before D128230. 2022-07-09 19:22:51 -07:00
docs [mlir] Add support for regex within `expected-*` diagnostics 2022-07-11 21:01:30 -07:00
examples [mlir] move SCF headers to SCF/{IR,Transforms} respectively 2022-06-20 10:18:01 +02:00
include [mlir][sparse] Switch to One-Shot Bufferize 2022-07-14 09:52:48 +02:00
lib [mlir][sparse] Switch to One-Shot Bufferize 2022-07-14 09:52:48 +02:00
python [mlir] Transform op for multitile size generation 2022-07-12 12:36:28 +00:00
test [mlir][sparse] Switch to One-Shot Bufferize 2022-07-14 09:52:48 +02:00
tools [mlir] Use value instead of getValue (NFC) 2022-07-14 00:19:59 -07:00
unittests [mlir] Use has_value instead of hasValue (NFC) 2022-07-13 00:57:02 -07:00
utils [vscode-mlir] add tablegen <> bracket colorization 2022-07-08 10:58:38 -07:00
.clang-format [mlir] Add missing newline at end of .clang-format file 2022-06-14 23:59:00 -07:00
.clang-tidy Enable readability-redundant-smartptr-get in MLIR local clang-tidy config 2022-01-08 20:07:11 +00:00
CMakeLists.txt Revert "[cmake] Don't export `LLVM_TOOLS_INSTALL_DIR` anymore" 2022-06-10 19:26:12 +00:00
LICENSE.TXT
README.md

README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.