[mlir][sparse] finalize sparse output in the presence of reductions
authorAart Bik <ajcbik@google.com>
Sat, 4 Dec 2021 00:55:43 +0000 (16:55 -0800)
committerAart Bik <ajcbik@google.com>
Tue, 7 Dec 2021 18:54:29 +0000 (10:54 -0800)
commit4f2ec7f983b40c5796beff96b0bc846a9dacac25
tree09aed3bdb90d591ee6b45a4cd77028d2a97898ce
parentd9aa5f61582dc8af05043b53c8b5855bfa5edcb0
[mlir][sparse] finalize sparse output in the presence of reductions

This revision implements sparse outputs (from scratch) in all cases where
the loops can be reordered with all but one parallel loops outer. If the
inner parallel loop appears inside one or more reductions loops, then an
access pattern expansion is required (aka. workspaces in TACO speak).

Reviewed By: bixia

Differential Revision: https://reviews.llvm.org/D115091
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
mlir/test/Dialect/SparseTensor/conversion.mlir
mlir/test/Dialect/SparseTensor/invalid.mlir
mlir/test/Dialect/SparseTensor/roundtrip.mlir
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matmul.mlir [new file with mode: 0644]