This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Add lowering rules for sparse_tensor.storage Op
ClosedPublic

Authored by Peiming on Sep 6 2022, 11:14 AM.

Diff Detail

Event Timeline

Peiming created this revision.Sep 6 2022, 11:14 AM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Sep 6 2022, 11:14 AM
aartbik accepted this revision.Sep 6 2022, 12:37 PM
aartbik added inline comments.
mlir/test/Dialect/SparseTensor/codegen.mlir
293

minor nitpick, these blocks of code are going to be almost literal repeats, except for the tuple part.
perhaps we should just check for the tuple parts in the STORAGE part

at the very least, let's use the same names for all variables that are shared?

This revision is now accepted and ready to land.Sep 6 2022, 12:37 PM
Peiming updated this revision to Diff 458265.Sep 6 2022, 1:39 PM

address comments from Aart

Peiming added inline comments.Sep 6 2022, 1:41 PM
mlir/test/Dialect/SparseTensor/codegen.mlir
293

How about the current way? I found that you can define multiple prefixes so that the common part can be checked by shared "CHECK" prefix, while the different parts can be checked by their own prefix.

aartbik accepted this revision.Sep 6 2022, 1:59 PM

This is beautiful! Thanks.

This revision was landed with ongoing or failed builds.Sep 6 2022, 2:04 PM
This revision was automatically updated to reflect the committed changes.