[Mlir-commits] [mlir] 2bce0c1 - [mlir][sparse] minor corrections and updates in sparse compiler doc
Aart Bik
llvmlistbot at llvm.org
Thu Dec 9 14:06:12 PST 2021
Author: Aart Bik
Date: 2021-12-09T14:06:02-08:00
New Revision: 2bce0c1c7f97b2fbf56bf28ac12460331dc7b3fd
URL: https://github.com/llvm/llvm-project/commit/2bce0c1c7f97b2fbf56bf28ac12460331dc7b3fd
DIFF: https://github.com/llvm/llvm-project/commit/2bce0c1c7f97b2fbf56bf28ac12460331dc7b3fd.diff
LOG: [mlir][sparse] minor corrections and updates in sparse compiler doc
Reviewed By: bixia
Differential Revision: https://reviews.llvm.org/D115467
Added:
Modified:
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td
index be689cfa2c783..13a89b2f91635 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td
+++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td
@@ -26,8 +26,8 @@ def SparseTensor_Dialect : Dialect {
The concept of **treating sparsity as a property, not a tedious
implementation detail**, by letting a **sparse compiler** generate
- sparse code automatically was pioneered for dense linear algebra by
- [Bik96] in MT1 (see https://www.aartbik.com/sparse.php) and formalized
+ sparse code automatically was pioneered for linear algebra by [Bik96]
+ in MT1 (see https://www.aartbik.com/sparse.php) and formalized
to tensor algebra by [Kjolstad17,Kjolstad20] in the Sparse Tensor
Algebra Compiler (TACO) project (see http://tensor-compiler.org).
@@ -48,18 +48,29 @@ def SparseTensor_Dialect : Dialect {
according to the way indices are exhausted. As such these iteration
lattices drive actual sparse code generation, which consists of a
relatively straightforward one-to-one mapping from iteration lattices
- to combinations of for-loops, while-loops, and if-statements.
+ to combinations of for-loops, while-loops, and if-statements. Sparse
+ tensor outputs that materialize uninitialized are handled with
+ insertions in pure lexicograph index order if all parallel loops
+ are outermost or using a 1-dimensional access pattern expansion
+ (a.k.a. workspace) where feasible [Gustavson72,Bik96,Kjolstad19].
* [Bik96] Aart J.C. Bik. Compiler Support for Sparse Matrix Computations.
PhD thesis, Leiden University, May 1996.
+ * [Chou18] Stephen Chou, Fredrik Berg Kjolstad, and Saman Amarasinghe.
+ Format Abstraction for Sparse Tensor Algebra Compilers. Proceedings of
+ the ACM on Programming Languages, October 2018.
+ * [Gustavson72] Fred G. Gustavson. Some basic techniques for solving
+ sparse systems of linear equations. In Sparse Matrices and Their
+ Applications, pages 41–52. Plenum Press, New York, 1972.
* [Kjolstad17] Fredrik Berg Kjolstad, Shoaib Ashraf Kamil, Stephen Chou, David
Lugato, and Saman Amarasinghe. The Tensor Algebra Compiler. Proceedings of
the ACM on Programming Languages, October 2017.
+ * [Kjolstad19] Fredrik Berg Kjolstad, Peter Ahrens, Shoaib Ashraf Kamil,
+ and Saman Amarasinghe. Tensor Algebra Compilation with Workspaces,
+ Proceedings of the IEEE/ACM International Symposium on Code Generation
+ and Optimization, 2019.
* [Kjolstad20] Fredrik Berg Kjolstad. Sparse Tensor Algebra Compilation.
PhD thesis, MIT, February, 2020.
- * [Chou18] Stephen Chou, Fredrik Berg Kjolstad, and Saman Amarasinghe.
- Format Abstraction for Sparse Tensor Algebra Compilers. Proceedings of
- the ACM on Programming Languages, October 2018.
}];
}
diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
index 4790090723cc2..9c27ae9d41ab6 100644
--- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
+++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
@@ -231,9 +231,9 @@ def SparseTensor_ExpandOp : SparseTensor_Op<"expand", []>,
given tensor. This operation is useful to implement kernels in which a
sparse tensor appears as output. This technique is known under several
diff erent names and using several alternative implementations,
- for example, phase counter [Gustavson71], expanded or switch array
+ for example, phase counter [Gustavson72], expanded or switch array
[Pissanetzky84], in phase scan [Duff90], access pattern expansion [Bik96],
- and workspaces [Kjolstad2018].
+ and workspaces [Kjolstad19].
The values and filled array have sizes that suffice for a *dense* innermost
dimension (e.g. a full row for matrices). The added array and count are used
More information about the Mlir-commits
mailing list