This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Moved preparation of sparse pointer structures out of recursion
ClosedPublic

Authored by wrengr on Aug 24 2021, 3:56 PM.

Details

Summary

Depends On D108670. Previously each recursive call of traverse checked whether the sparse pointer structures were empty (and so needed preparation). Now we prepare all the sparse pointer structures in one go, thereby simplifying the traverse function (and marginally improving performance).

Diff Detail

Event Timeline

wrengr created this revision.Aug 24 2021, 3:56 PM
wrengr requested review of this revision.Aug 24 2021, 3:56 PM
aartbik added inline comments.Aug 24 2021, 4:25 PM
mlir/lib/ExecutionEngine/SparseUtils.cpp
188

please spell upperbound "r" out as rank = getRank() to be more consistent with surroundings
(also, I mostly use d++ and not ++d for ints, but I know where you are coming from with that ;-)

wrengr retitled this revision from Moved preparation of sparse pointer structures from traverse to the constructor to [mlir][sparse] Moved preparation of sparse pointer structures out of recursion.Aug 24 2021, 6:51 PM
wrengr edited the summary of this revision. (Show Details)
wrengr updated this revision to Diff 368957.Aug 26 2021, 12:14 PM
wrengr marked an inline comment as done.

[mlir][sparse] Moved preparation of sparse pointer structures out of recursion

aartbik accepted this revision.Aug 26 2021, 8:13 PM

A rebase may actually give a conflict (or simply show nodiff after pulling in my recent change).
But approving the change formally here.

This revision is now accepted and ready to land.Aug 26 2021, 8:13 PM
wrengr closed this revision.Aug 28 2021, 4:25 PM