This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] support constant affine expression on dense dimension
ClosedPublic

Authored by Peiming on Nov 16 2022, 5:48 PM.

Diff Detail

Event Timeline

Peiming created this revision.Nov 16 2022, 5:48 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Nov 16 2022, 5:48 PM
Peiming updated this revision to Diff 476253.Nov 17 2022, 3:39 PM

update test cases.

Peiming updated this revision to Diff 476255.Nov 17 2022, 3:41 PM

update comments

Peiming updated this revision to Diff 476258.Nov 17 2022, 3:48 PM

small fixes.

Peiming updated this revision to Diff 476280.Nov 17 2022, 4:44 PM

small fix

Peiming updated this revision to Diff 476284.Nov 17 2022, 4:48 PM

clang-format

This comment was removed by aartbik.
Peiming updated this revision to Diff 477244.Nov 22 2022, 10:09 AM

update comments.

aartbik added inline comments.Nov 22 2022, 11:42 AM
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
1177

what does it mean if we reach here?

1301

Until now

1302

addressed -> addresses

dependend -> dependent

Peiming added inline comments.Nov 22 2022, 1:48 PM
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
1177

Good question, I should assert(false) here, it should have been rejected... But that code is in the upcoming patch (see D138171)

// TODO: support compound affine expression on sparse output.
if (getNumCompoundAffineOnSparseDims(op.getMatchingIndexingMap(lhs),
                                     lhs->get()) != 0)
  return false;
Peiming updated this revision to Diff 477292.Nov 22 2022, 1:54 PM

address comments.

Peiming marked 3 inline comments as done.Nov 22 2022, 1:55 PM
aartbik accepted this revision.Nov 22 2022, 2:23 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/Sparsification.cpp
1177

then it is ok, since that will go in shortly too ;-)

This revision is now accepted and ready to land.Nov 22 2022, 2:23 PM