This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Improve concatenate operation conversion for the case with annotated all dense result.
ClosedPublic

Authored by bixia on Dec 5 2022, 10:02 AM.

Diff Detail

Event Timeline

bixia created this revision.Dec 5 2022, 10:02 AM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Dec 5 2022, 10:02 AM
aartbik accepted this revision.Dec 5 2022, 2:20 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
1320

I would make a note here of the special case you added

This revision is now accepted and ready to land.Dec 5 2022, 2:20 PM
wrengr added inline comments.Dec 5 2022, 3:38 PM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
1385

This isn't going to be forward compatible. Instead, please use the createOrFoldLvlCall function from D139165.

1428

It'd be better to name this variable dimInd or lvlInd as appropriate

bixia updated this revision to Diff 480940.Dec 7 2022, 8:59 AM
bixia marked 2 inline comments as done.

Modified comment to reflect the change in the implementation. Rename some variables.

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorConversion.cpp
1385

We can't use createOrFoldlvlCall function here, as we are not querying the level size for an existing tensor, instead, we are computing the level size for a destination tensor that we will construct. Dimension "sizes" are calculated in line 1228.

This revision was landed with ongoing or failed builds.Dec 7 2022, 12:06 PM
This revision was automatically updated to reflect the committed changes.