Skip to content

Commit 4f729d5

Browse files
committed
[mlir][sparse] Add rewriting rules for sparse_tensor.sort_coo.
Refactor the rewriting of sparse_tensor.sort to support the implementation of sparse_tensor.sort_coo. Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D137522
1 parent df2f9e5 commit 4f729d5

File tree

5 files changed

+374
-96
lines changed

5 files changed

+374
-96
lines changed

mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -529,10 +529,10 @@ def SparseTensor_SortCooOp : SparseTensor_Op<"sort_coo">,
529529
Sparse_tensor.sort_coo is similar to sparse_tensor.sort, except that all the
530530
`xs` values and some `ys` values are put in the linear buffer `xy`. The
531531
optional index attribute `nx` provides the number of `xs` values in `xy`.
532-
When `ns` is not explicitly specified, its value is 1. The optional index
532+
When `nx` is not explicitly specified, its value is 1. The optional index
533533
attribute `ny` provides the number of `ys` values in `xy`. When `ny` is not
534-
explicitly specified, its value is 0. This instruction supports the TACO
535-
COO style storage format for better sorting performance.
534+
explicitly specified, its value is 0. This instruction supports a more
535+
efficient way to store the COO definition in sparse tensor type.
536536

537537
The buffer xy should have a dimension not less than n * (nx + ny) while the
538538
buffers in `ys` should have a dimension not less than `n`. The behavior of

0 commit comments

Comments
 (0)