This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] fix a bug in UnpackOp converter.
ClosedPublic

Authored by Peiming on Feb 14 2023, 6:19 PM.

Details

Summary

UnpackOp Converter used to create reallocOp unconditionally, but it might cause issue when the requested memory size is smaller than the actually storage.

Diff Detail

Event Timeline

Peiming created this revision.Feb 14 2023, 6:19 PM
Herald added a project: Restricted Project. · View Herald Transcript
Peiming requested review of this revision.Feb 14 2023, 6:19 PM
aartbik accepted this revision.Feb 14 2023, 6:22 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
1185

this should be in the "helper methods" section, and have a comment

This revision is now accepted and ready to land.Feb 14 2023, 6:22 PM
wrengr added inline comments.Feb 14 2023, 6:22 PM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
1187

Use getMemRefType(buffer) instead

Peiming updated this revision to Diff 497519.Feb 14 2023, 6:25 PM

code movement.

Peiming marked 2 inline comments as done.Feb 14 2023, 6:25 PM
This revision was landed with ongoing or failed builds.Feb 14 2023, 6:36 PM
This revision was automatically updated to reflect the committed changes.