[mlir][sparse] Add rewrite rule for the sort operator.
authorbixia1 <bixia@google.com>
Wed, 28 Sep 2022 19:59:00 +0000 (12:59 -0700)
committerbixia1 <bixia@google.com>
Thu, 29 Sep 2022 18:38:19 +0000 (11:38 -0700)
commit062e515b701930a17e3d6b75b3a27cb4d9a6f984
treefbfc0975ef1e6af4507f4e43c6a785a1157d52a2
parent13921262cae0e7346e41875c1850d8861be0488e
[mlir][sparse] Add rewrite rule for the sort operator.

Add sparse-buffer-rewrite pass to rewrite sparse primitives on buffers to MLIR
implementation.

Add sparse rewrite rule for the sort operator.

Add FileCheck test and integration test.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D134627
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.h
mlir/include/mlir/Dialect/SparseTensor/Transforms/Passes.td
mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
mlir/lib/Dialect/SparseTensor/Transforms/CMakeLists.txt
mlir/lib/Dialect/SparseTensor/Transforms/SparseBufferRewriting.cpp [new file with mode: 0644]
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
mlir/test/Dialect/SparseTensor/buffer_rewriting.mlir [new file with mode: 0644]
mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_rewrite_sort.mlir [new file with mode: 0644]