This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] add memSizes array to sparse storage format
ClosedPublic

Authored by aartbik on Sep 12 2022, 1:15 PM.

Details

Summary

Rationale:
For every dynamic memref (memref<?xtype>), the stored size really
indicates the capacity and the entry in the memSizes indicates
the actual size. This allows us to use memref's as "vectors".

Diff Detail

Event Timeline

aartbik created this revision.Sep 12 2022, 1:15 PM
Herald added a project: Restricted Project. · View Herald TranscriptSep 12 2022, 1:15 PM
aartbik requested review of this revision.Sep 12 2022, 1:15 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
104

I simply moved this up so we can precompute #fields easier

546

I moved base class closer to actual usage. It was split.

626–627

I changed this to order in which they appear in file

Peiming accepted this revision.Sep 12 2022, 1:56 PM
This revision is now accepted and ready to land.Sep 12 2022, 1:56 PM