[all-commits] [llvm/llvm-project] 16b8f4: [mlir][sparse] add a "release" operation to sparse...
Aart Bik via All-commits
all-commits at lists.llvm.org
Tue Oct 5 09:36:16 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 16b8f4ddae1cb36ac16c6eb451613c032e4064f6
https://github.com/llvm/llvm-project/commit/16b8f4ddae1cb36ac16c6eb451613c032e4064f6
Author: Aart Bik <ajcbik at google.com>
Date: 2021-10-05 (Tue, 05 Oct 2021)
Changed paths:
M mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
M mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
M mlir/test/Dialect/SparseTensor/conversion.mlir
M mlir/test/Dialect/SparseTensor/invalid.mlir
M mlir/test/Dialect/SparseTensor/roundtrip.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/dense_output.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/lit.local.cfg
R mlir/test/Integration/Dialect/SparseTensor/CPU/sparse-constant_to_sparse_tensor.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_cast.mlir
A mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_constant_to_sparse_tensor.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_conversion.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_filter_conv2d.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_flatten.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matvec.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_mttkrp.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_out_simple.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_quantized_matmul.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_reductions.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_matmul.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_mm_fusion.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_scale.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_spmm.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_storage.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sum.mlir
Log Message:
-----------
[mlir][sparse] add a "release" operation to sparse tensor dialect
We have several ways to materialize sparse tensors (new and convert) but no explicit operation to release the underlying sparse storage scheme at runtime (other than making an explicit delSparseTensor() library call). To simplify memory management, a sparse_tensor.release operation has been introduced that lowers to the runtime library call while keeping tensors, opague pointers, and memrefs transparent in the initial IR.
*Note* There is obviously some tension between the concept of immutable tensors and memory management methods. This tension is addressed by simply stating that after the "release" call, no further memref related operations are allowed on the tensor value. We expect the design to evolve over time, however, and arrive at a more satisfactory view of tensors and buffers eventually.
Bug:
http://llvm.org/pr52046
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D111099
More information about the All-commits
mailing list