This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] adding OverheadType::kIndex
ClosedPublic

Authored by wrengr on Dec 2 2021, 4:43 PM.

Details

Summary

Depends On D115008

This change opens the way for D115012, and removes some corner cases in CodegenUtils.cpp. The SparseTensorAttrDefs.td already specifies that we allow 0 bitwidth for the two overhead types and that it is interpreted to mean the architecture's native width.

Diff Detail

Event Timeline

wrengr created this revision.Dec 2 2021, 4:43 PM
wrengr requested review of this revision.Dec 2 2021, 4:43 PM
wrengr edited the summary of this revision. (Show Details)Dec 2 2021, 5:46 PM
wrengr updated this revision to Diff 391514.Dec 2 2021, 5:56 PM

rebasing for changes to comments in the dependency D115008

aartbik added inline comments.Dec 3 2021, 9:54 AM
mlir/include/mlir/ExecutionEngine/SparseTensorUtils.h
20–21

"elemental type" does not seem right, given that we aslo say that for L24

mlir/lib/Dialect/SparseTensor/Utils/CodegenUtils.cpp
29 ↗(On Diff #391514)

this default makes less sense now

mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
850–851

This seems to be a compiler assert that should be outside any method

wrengr updated this revision to Diff 391776.Dec 3 2021, 4:35 PM
wrengr marked 3 inline comments as done.

Fixing comments

mlir/include/mlir/ExecutionEngine/SparseTensorUtils.h
20–21

yikes, how'd that get there. Fixed.

aartbik accepted this revision.Dec 6 2021, 12:54 PM

Good to go after you address my last nits

mlir/test/Dialect/SparseTensor/conversion_sparse2dense.mlir
31–32

Let's remove this clarification. In the future, people may use automated tools to regenerate (some of) these CHECKs, and very few people actually read inside the CHECK blocks anyway

70–71

same

This revision is now accepted and ready to land.Dec 6 2021, 12:54 PM
wrengr updated this revision to Diff 392182.Dec 6 2021, 2:20 PM
wrengr marked 2 inline comments as done.

fixing nits

wrengr updated this revision to Diff 392519.Dec 7 2021, 1:37 PM

rebasing to updated D115008

wrengr updated this revision to Diff 392979.Dec 8 2021, 4:46 PM

rebasing, to hopefully fix the windows build failure

wrengr updated this revision to Diff 395530.Dec 20 2021, 3:20 PM

rebasing for changed D115008

This revision was automatically updated to reflect the committed changes.