diff --git a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td --- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td +++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorBase.td @@ -59,7 +59,7 @@ * [Biketal22] Aart J.C. Bik, Penporn Koanantakool, Tatiana Shpeisman, Nicolas Vasilache, Bixia Zheng, and Fredrik Kjolstad. Compiler Support for Sparse Tensor Computations in MLIR. ACM Transactions on Architecture - and Code Optimization, June, 2022 (see https://dl.acm.org/doi/10.1145/3544559). + and Code Optimization, June, 2022. See: https://dl.acm.org/doi/10.1145/3544559 * [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 --- a/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td +++ b/mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td @@ -514,6 +514,7 @@ ``` Example returning +1 for existing values and -1 for missing values: + ```mlir %result = sparse_tensor.unary %a : f64 to i32 present={ @@ -529,6 +530,7 @@ Example showing a structural inversion (existing values become missing in the output, while missing values are filled with 1): + ```mlir %result = sparse_tensor.unary %a : f64 to i64 present={} @@ -562,7 +564,6 @@ argument types. Note that this operation is only required for custom reductions beyond the - standard operations (add, mul, and, or, etc). The `linalg.generic` `iterator_types` defines which indices are being reduced. When the associated operands are used in an operation, a reduction will occur. The use of this