Skip to content

Commit

Permalink
[mlir][sparse] first general insertion implementation with pure codegen
Browse files Browse the repository at this point in the history
This revision generalizes lowering the sparse_tensor.insert op into actual code that directly operates on the memrefs of a sparse storage scheme. The current insertion strategy does *not* rely on a cursor anymore, with introduces some testing overhead for each insertion (but still proportional to the rank, as before). Over time, we can optimize the code generation, but this version enables us to finish the effort to migrate from library to actual codegen.

Things to do:
(1) carefully deal with (un)ordered and (not)unique
(2) omit overhead when not needed
(3) optimize and specialize
(4) try to avoid the pointer "cleanup" (at HasInserts), and make sure the storage scheme is consistent at every insertion point (so that it can "escape" without concerns).

Reviewed By: Peiming

Differential Revision: https://reviews.llvm.org/D137457
  • Loading branch information
aartbik committed Nov 8, 2022
1 parent 7c5362c commit 70633a8
Show file tree
Hide file tree
Showing 5 changed files with 814 additions and 408 deletions.
Loading

0 comments on commit 70633a8

Please sign in to comment.