This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Fix a problem in the new operator rewriter.
ClosedPublic

Authored by bixia on Nov 17 2022, 10:20 AM.

Details

Summary

The getSparseTensorReaderNextX functions should return void.

Diff Detail

Event Timeline

bixia created this revision.Nov 17 2022, 10:20 AM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Nov 17 2022, 10:20 AM
Peiming added inline comments.Nov 17 2022, 11:42 AM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
933–934

If resultType is empty, why is it safe to call getResult(0) here?

933–934

Plus, you did not catch the value anyway.

aartbik accepted this revision.Nov 17 2022, 12:30 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorRewriting.cpp
933–934

+1, just remove the getResult call

This revision is now accepted and ready to land.Nov 17 2022, 12:30 PM
bixia updated this revision to Diff 476211.Nov 17 2022, 12:42 PM

Remove unnecessary getResult(0).

This revision was automatically updated to reflect the committed changes.