This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Move some member functions from SparseTensorDescriptorImpl to MutSparseTensorDescriptor.
ClosedPublic

Authored by bixia on Jan 4 2023, 10:03 AM.

Details

Summary

This is to prepare for implementing AOS optimization.

Diff Detail

Event Timeline

bixia created this revision.Jan 4 2023, 10:03 AM
Herald added a project: Restricted Project. · View Herald Transcript
bixia requested review of this revision.Jan 4 2023, 10:03 AM
aartbik added inline comments.Jan 4 2023, 10:27 AM
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
970

While here, can you update the comment to

actually stored size.

(singular, and value did not add much)

972

It is a bit strange that we need the mutable class now to query a read-only field.
As discussed offline, perhaps these classes mean different things now.

Also, even in the "new" class, can we have a version that does not need passing in the dummy fields?

bixia updated this revision to Diff 486352.Jan 4 2023, 11:36 AM
bixia marked 2 inline comments as done.

Fix comments, add codegen util for generating code to access values memref size.

mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorCodegen.cpp
972

Per offline discussion, move this to codegen utils.

aartbik accepted this revision.Jan 4 2023, 11:47 AM
This revision is now accepted and ready to land.Jan 4 2023, 11:47 AM
bixia updated this revision to Diff 486368.Jan 4 2023, 12:36 PM

Applied clang-format.

Peiming added a subscriber: Peiming.Jan 7 2023, 5:38 PM
Peiming added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/SparseTensorStorageLayout.h
301

This template parameter is no longer needed, the sole purpose of it was to enable SFINAE