[mlir][sparse] avoid unnecessary tmp COO buffer and convert when lowering ConcatentateOp.
authorPeiming Liu <peiming@google.com>
Fri, 16 Dec 2022 18:12:05 +0000 (18:12 +0000)
committerPeiming Liu <peiming@google.com>
Fri, 16 Dec 2022 18:26:39 +0000 (18:26 +0000)
commita3672add76051ed27486eb163a8d0efbdf76f898
tree4833e286dc233f732ddbc04340cd38261399d88e
parent470bc76b1350119ede9768fd3e83a56d361d43f3
[mlir][sparse] avoid unnecessary tmp COO buffer and convert when lowering ConcatentateOp.

When concat along dim 0, and all inputs/outputs are ordered with identity dimension ordering,
the concatenated coordinates will be yield in lexOrder, thus no need to sort.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D140228
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorAttrDefs.td
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
mlir/test/Dialect/SparseTensor/sparse_concat_codegen.mlir