This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] complete migration to sparse tensor type
ClosedPublic

Authored by aartbik on May 7 2021, 3:49 PM.

Details

Summary

A very elaborate, but also very fun revision because all
puzzle pieces are finally "falling in place".

  1. replaces lingalg annotations + flags with proper sparse tensor types
  2. add rigorous verification on sparse tensor type and sparse primitives
  3. removes glue and clutter on opaque pointers in favor of sparse tensor types
  4. migrates all tests to use sparse tensor types
NOTE: next CL will remove *all* obsoleted sparse code in Linalg

Diff Detail

Event Timeline

aartbik created this revision.May 7 2021, 3:49 PM
aartbik requested review of this revision.May 7 2021, 3:50 PM
aartbik updated this revision to Diff 343788.May 7 2021, 5:19 PM

fix lint issue

bixia added inline comments.May 10 2021, 9:00 AM
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
211–215

Can this code go to a verify method for SparseTensorEncodingAttr? I see it is duplicated in line 227-231.

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorPasses.cpp
99

q

aartbik marked 2 inline comments as done.May 10 2021, 10:35 AM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/IR/SparseTensorDialect.cpp
211–215

It is mostly the same, but also a bit different. I tried to refactor some common code out. See if you like the result.

aartbik updated this revision to Diff 344120.May 10 2021, 10:56 AM
aartbik marked an inline comment as done.

addressed comments

bixia accepted this revision.May 10 2021, 11:10 AM
This revision is now accepted and ready to land.May 10 2021, 11:10 AM
This revision was landed with ongoing or failed builds.May 10 2021, 12:55 PM
This revision was automatically updated to reflect the committed changes.
mlir/test/Dialect/SparseTensor/sparse_3d.mlir