This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] fixed pack op documentation and purity
ClosedPublic

Authored by aartbik on Feb 9 2023, 1:55 PM.

Details

Summary

Example did not have correct shapes. Also the operation
has no side effects (since it slaps a clean SSA tensor
around the data).

Diff Detail

Event Timeline

aartbik created this revision.Feb 9 2023, 1:55 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2023, 1:55 PM
aartbik requested review of this revision.Feb 9 2023, 1:55 PM
aartbik retitled this revision from [mlir][sparse] fixed pack op documention and purity to [mlir][sparse] fixed pack op documentation and purity.
wrengr accepted this revision.Feb 9 2023, 7:34 PM
wrengr added inline comments.
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
90–91

I'd leave the values in the format 1.0, 2.0, 3.0 to help keep it clear how the result relates to the inputs. Even better would be to change the values to something else entirely (e.g., [4,5,6]) so that there's no possible confusion (similar to how the example uses 3x2 rather than 2x2 which would be ambiguous).

This revision is now accepted and ready to land.Feb 9 2023, 7:34 PM
Peiming added inline comments.Feb 10 2023, 9:11 AM
mlir/include/mlir/Dialect/SparseTensor/IR/SparseTensorOps.td
85–92

Oh, I found the typo and but changed it to tensor<2xf64> in unpack revision ;-) I will accept your change since Wren made a good point that 2x2 can be ambiguous.

Peiming accepted this revision.Feb 10 2023, 3:21 PM
aartbik updated this revision to Diff 496628.Feb 10 2023, 4:26 PM
aartbik marked an inline comment as done.

let fp values jump out more

This revision was landed with ongoing or failed builds.Feb 10 2023, 4:29 PM
This revision was automatically updated to reflect the committed changes.