This is an archive of the discontinued LLVM Phabricator instance.

[sparse][mlir] give all sparse kernels an explicit "output" tensor
ClosedPublic

Authored by aartbik on Jan 27 2021, 9:05 PM.

Details

Summary

Rationale:
Providing an output tensor, even if one is not used as input to
the kernel provides the right pattern for using lingalg sparse
kernels (in contrast with reusing a tensor just to provide the shape).
This prepares proper bufferization that will follow.

Diff Detail

Event Timeline

aartbik created this revision.Jan 27 2021, 9:05 PM
aartbik requested review of this revision.Jan 27 2021, 9:05 PM

LGTM. Thanks for fixing this!

mlir/test/Dialect/Linalg/sparse_3d.mlir
1365

Shall we also remove the space right after %argb in this line?

1427–1428

I see extract space right before : in these two lines. Shall we remove them?

aartbik marked 2 inline comments as done.Jan 28 2021, 10:11 AM
aartbik added inline comments.
mlir/test/Dialect/Linalg/sparse_3d.mlir
1365

I was cleaning this up and go tired. But since you insist :-)
I fixed all issues (I think)

1427–1428

cleaning them all up!

bixia accepted this revision.Jan 28 2021, 10:28 AM
This revision is now accepted and ready to land.Jan 28 2021, 10:28 AM
aartbik updated this revision to Diff 319918.Jan 28 2021, 10:38 AM
aartbik marked 2 inline comments as done.

remove space between : for arguments, kept single space for statements

This revision was landed with ongoing or failed builds.Jan 28 2021, 10:41 AM
This revision was automatically updated to reflect the committed changes.