This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Adding {pointer,index}OverheadTypeEncoding
ClosedPublic

Authored by wrengr on Mar 18 2022, 8:02 PM.

Details

Summary

Work towards: https://github.com/llvm/llvm-project/issues/51652

The new functions fill the gap between overheadTypeEncoding and get{Pointer,Index}OverheadType.

Diff Detail

Event Timeline

wrengr created this revision.Mar 18 2022, 8:02 PM
wrengr requested review of this revision.Mar 18 2022, 8:02 PM
wrengr edited the summary of this revision. (Show Details)Mar 21 2022, 1:26 PM

Since writing this differential I managed to adjust the implementation of enumerators in D122060 so that the subsequent D122061 can remain ignorant of the source tensor's <P,I> template parameters. Originally, the functions in this differential were used in D122061 in order to detect/assert that the source tensor's <P,I> match the target tensor's <P,I>.

Even though they're no longer being used anywhere, I think it's still useful to fill the API gap.

aartbik accepted this revision.Mar 22 2022, 8:20 PM
aartbik added inline comments.
mlir/lib/Dialect/SparseTensor/Transforms/CodegenUtils.h
42

here, and below, I don't feel very strongly about this, but using a parameter name even here seems more consistent with this file, so

const SparseTensorEncodingAttr &enc

This revision is now accepted and ready to land.Mar 22 2022, 8:20 PM
wrengr updated this revision to Diff 417691.Mar 23 2022, 10:56 AM
wrengr marked an inline comment as done.

addressing style

This revision was automatically updated to reflect the committed changes.