This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse] Moving lexOrder from SparseTensorCOO to Element
ClosedPublic

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

Details

Summary

This is the more logical place for the function to live. If/when we factor out a separate class for just the Coordinates themselves, then the definition should be moved to Coordinates::lexOrder (and Element::lexOrder would become a thin wrapper delegating to that function).

This is (tangentially) work towards fixing: https://github.com/llvm/llvm-project/issues/51652

Diff Detail

Event Timeline

wrengr created this revision.Mar 18 2022, 8:03 PM
wrengr requested review of this revision.Mar 18 2022, 8:03 PM
aartbik accepted this revision.Mar 19 2022, 12:48 PM
aartbik added inline comments.
mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
85

I think technically methods appear before data, but I find what you did not readable as well, so good to go.

This revision is now accepted and ready to land.Mar 19 2022, 12:48 PM
wrengr added inline comments.Mar 21 2022, 1:36 PM
mlir/lib/ExecutionEngine/SparseTensorUtils.cpp
85

I'm not sure I follow. Did you want me to move the function a couple lines up, or leave it as is?