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.
Differential D134627
[mlir][sparse] Add rewrite rule for the sort operator. bixia on Sep 25 2022, 11:27 PM. Authored by
Details Add sparse-buffer-rewrite pass to rewrite sparse primitives on buffers to MLIR Add sparse rewrite rule for the sort operator. Add FileCheck test and integration test.
Diff Detail
Event Timeline
Comment Actions Decouple SortOp from the utility routines that generate sorting code.
Comment Actions Since this is a sizable chunk of code that's rather independent of the rest of the codegen, I think it should be moved off to a separate file. (Anticipating there being a number of other similar large chunks of codegen code, I'd suggest adding a subdirectory and calling it lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen/Sort.cpp)
Comment Actions This is moved to file for rewriting primitives that use buffers now.
Comment Actions Address review comments.
Comment Actions This is looking pretty good! A few minor comments and suggestions
|
Does this need to be a global pass, or can you use addNestedPass<FuncOp> instead? (It's unclear to me if that's valid for the way getMangledSortHelperFunc is defined)