Commit Graph

10 Commits

Author SHA1 Message Date
bixia1 5618d2bea9 [mlir][sparse] Add option enable-buffer-initialization to initialize the memory buffers for sparse tensors to support debugging.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D137592
2022-11-08 09:54:33 -08:00
bixia1 9b800bf79d [mlir][sparse] Improve the non-stable sort implementation.
Replace the quick sort partition method with one that is more similar to the
method used by C++ std quick sort. This improves the runtime for sorting
sk_2005.mtx by more than 10x.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D137290
2022-11-07 07:38:42 -08:00
bixia1 d45be88736 [mlir][sparse] Implement the rewrite for sparse_tensor.push_back a value n times.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D136654
2022-10-31 08:19:12 -07:00
Mehdi Amini 9b170d126f Apply clang-tidy fixes for readability-identifier-naming in SparseBufferRewriting.cpp (NFC) 2022-10-13 02:58:34 +00:00
Mehdi Amini f628d6c3e8 Apply clang-tidy fixes for modernize-use-using in SparseBufferRewriting.cpp (NFC) 2022-10-12 16:22:43 +00:00
bixia1 9409bbb2e0 [mlir][sparse] Implement insertion sort for the stable sort operator.
Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D135182
2022-10-06 09:48:39 -07:00
bixia1 1c835b5a8e [mlir][sparse] Allow the push_back operator to skip capacity check and reallocation.
Add UnitAttr `inbounds` for this purpose.

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D134913
2022-09-29 16:38:06 -07:00
bixia1 654bbbde55 [mlir][sparse] Move the implementation of sparse_tensor.push_back to the buffer rewriter.
Reviewed By: aartbik, Peiming

Differential Revision: https://reviews.llvm.org/D134777
2022-09-29 15:06:00 -07:00
Aart Bik bfbf3bcb37 [mlir][sparse] fix build breakage due to Arith name change
Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D134899
2022-09-29 12:12:43 -07:00
bixia1 062e515b70 [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
2022-09-29 11:38:19 -07:00