This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] add conversion rules for storage_get/set/callOp
ClosedPublic

Authored by Peiming on Sep 1 2022, 6:01 PM.

Diff Detail

Event Timeline

Peiming created this revision.Sep 1 2022, 6:01 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Sep 1 2022, 6:01 PM
aartbik added inline comments.Sep 1 2022, 6:57 PM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorStorageExpansion.cpp
68

period at end

85

same

141

Can you please use (1), (2) etc.

In vi, unmatched braces, even in comments, sometimes mess up my navigation :-)

152

to hold the ...?

mlir/test/Dialect/SparseTensor/sparse_tensor_storage.mlir
30

indent return at % above

42

same

Peiming updated this revision to Diff 457609.Sep 2 2022, 8:46 AM
Peiming marked 5 inline comments as done.

Address comments

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorStorageExpansion.cpp
152

Removing it... as I optimized it using iterator_range (which should avoid data movement).

mlir/test/Dialect/SparseTensor/sparse_tensor_storage.mlir
30

Okay, I actually did it on purpose, to indicate the start of the function body.

But yeah, probably indenting at the same space looks nicer.

Peiming updated this revision to Diff 457634.Sep 2 2022, 10:32 AM

Add missing period...

aartbik accepted this revision.Sep 2 2022, 11:16 AM

Last nits, but good to go in once addressed.

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

Nit: with some shorter text it will fit on one line ;)

// The unrealized cast is needed to intermix tuples and a list of types.

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorStorageExpansion.cpp
44

Flattens (with s) is a bit more consistent with style above,

also period at end

126

period at end

This revision is now accepted and ready to land.Sep 2 2022, 11:16 AM
This revision was landed with ongoing or failed builds.Sep 2 2022, 11:28 AM
This revision was automatically updated to reflect the committed changes.