[all-commits] [llvm/llvm-project] 2af2e4: [mlir][sparse] Breaking up openSparseTensor to bet...
wren romano via All-commits
all-commits at lists.llvm.org
Fri Dec 2 11:11:13 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2af2e4dbb790daafd3cbbf6189a7a27145cf4c12
https://github.com/llvm/llvm-project/commit/2af2e4dbb790daafd3cbbf6189a7a27145cf4c12
Author: wren romano <2998727+wrengr at users.noreply.github.com>
Date: 2022-12-02 (Fri, 02 Dec 2022)
Changed paths:
M mlir/include/mlir/Dialect/SparseTensor/IR/Enums.h
M mlir/include/mlir/ExecutionEngine/SparseTensor/File.h
M mlir/include/mlir/ExecutionEngine/SparseTensorRuntime.h
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
M mlir/lib/ExecutionEngine/SparseTensor/File.cpp
M mlir/lib/ExecutionEngine/SparseTensorRuntime.cpp
M mlir/test/Dialect/SparseTensor/conversion.mlir
M mlir/test/Dialect/SparseTensor/rewriting_for_codegen.mlir
M mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_file_io.mlir
Log Message:
-----------
[mlir][sparse] Breaking up openSparseTensor to better support non-permutations
This commit updates how the `SparseTensorConversion` pass handles `NewOp`. It breaks up the underlying `openSparseTensor` function into two parts (`SparseTensorReader::create` and `SparseTensorReader::readSparseTensor`) so that the pass can inject code for constructing `lvlSizes` between those two parts. Migrating the construction of `lvlSizes` out of the runtime and into the pass is a necessary first step toward fully supporting non-permutations. (The alternative would be for the pass to generate a `FuncOp` for performing the construction and then passing that to the runtime; which doesn't seem to have any benefits over the design of this commit.) And since the pass now generates the code to call these two functions, this change also removes the `Action::kFromFile` value from the enum used by `_mlir_ciface_newSparseTensor`.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D138363
More information about the All-commits
mailing list