[all-commits] [llvm/llvm-project] f708a5: [mlir][sparse] Factoring out SparseTensorType class
wren romano via All-commits
all-commits at lists.llvm.org
Tue Feb 14 19:17:34 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f708a549b87e163e144b41fe1887951c5639027d
https://github.com/llvm/llvm-project/commit/f708a549b87e163e144b41fe1887951c5639027d
Author: wren romano <2998727+wrengr at users.noreply.github.com>
Date: 2023-02-14 (Tue, 14 Feb 2023)
Changed paths:
M mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensor.h
M mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td
A mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorType.h
M mlir/lib/CAPI/Dialect/SparseTensor.cpp
M mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/CodegenEnv.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
M mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseStorageSpecifierToLLVM.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorStorageLayout.cpp
M mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorStorageLayout.h
M mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
M mlir/test/Dialect/SparseTensor/invalid.mlir
M mlir/test/Dialect/SparseTensor/invalid_encoding.mlir
M utils/bazel/llvm-project-overlay/mlir/BUILD.bazel
Log Message:
-----------
[mlir][sparse] Factoring out SparseTensorType class
This change adds a new `SparseTensorType` class for making the "dim" vs "lvl" distinction more overt, and for abstracting over the differences between sparse-tensors and dense-tensors. In addition, this change also adds new type aliases `Dimension`, `Level`, and `FieldIndex` to make code more self-documenting.
Although the diff is very large, the majority of the changes are mechanical in nature (e.g., changing types to use the new aliases, updating variable names to match, etc). Along the way I also made many variables `const` when they could be; the majority of which required only adding the keyword. A few places had conditional definitions of these variables, requiring actual code changes; however, that was only done when the overall change was extremely local and easy to extract. All these changes are included in the current patch only because it would be too onerous to split them off into a separate patch.
Reviewed By: aartbik
Differential Revision: https://reviews.llvm.org/D143800
More information about the All-commits
mailing list