This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] fix various bug to support sparse pooling
ClosedPublic

Authored by Peiming on May 30 2023, 9:53 PM.

Diff Detail

Event Timeline

Peiming created this revision.May 30 2023, 9:53 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.May 30 2023, 9:53 PM
Peiming planned changes to this revision.May 30 2023, 9:54 PM
Peiming requested review of this revision.Jun 1 2023, 10:53 AM
Peiming added reviewers: wrengr, bixia.
Peiming updated this revision to Diff 527511.Jun 1 2023, 11:04 AM

code cleanup

Peiming retitled this revision from [draft] sparse pooling to [mlir][sparse] fix various bug to support sparse pooling.Jun 1 2023, 11:09 AM
Peiming updated this revision to Diff 527519.Jun 1 2023, 11:09 AM

code cleanup.

Peiming added a reviewer: K-Wu.Jun 1 2023, 4:41 PM
Peiming updated this revision to Diff 527664.Jun 1 2023, 4:42 PM

fix leak

aartbik accepted this revision.Jun 1 2023, 4:48 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/LoopEmitter.cpp
1368

just wondering if we can have a few more asserts here to guard against unexpected case
e.g. when there is no yield, assert on iter args

but just something to ponder on, not needed now

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pooling_nhwc.mlir
15

do we actually vectorize?

if not, then we should probably not introduce the extra runs
but I hope we indeed are ;-) but please check

This revision is now accepted and ready to land.Jun 1 2023, 4:48 PM
Peiming updated this revision to Diff 527675.Jun 1 2023, 5:23 PM

address comments.

Peiming updated this revision to Diff 527678.Jun 1 2023, 5:31 PM
Peiming marked 2 inline comments as done.

remove useless test run

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_pooling_nhwc.mlir
15

It vectorized other places that we are not particularly interested in this test, I removed them.

This revision was automatically updated to reflect the committed changes.