This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse][gpu] various cuSparse refinements
ClosedPublic

Authored by aartbik on May 24 2023, 8:55 PM.

Details

Summary

(1) keep all cuSparse ops on single stream without wait() in right order
(2) use more type precise memref types for COO
(3) use ToTensor on resulting memref (even though it folds away again)

Diff Detail

Event Timeline

aartbik created this revision.May 24 2023, 8:55 PM
Herald added a project: Restricted Project. · View Herald Transcript
aartbik requested review of this revision.May 24 2023, 8:55 PM
K-Wu added inline comments.May 24 2023, 9:38 PM
mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
392

Can we do an colA assertion at the beginning of the function instead of doing it twice?

aartbik added inline comments.May 24 2023, 9:45 PM
mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
392

Ah, in this case we could but.... if we implement the "unreachable" part (which I have in my local workspace wiht a COO_AOS) then you have a path without col coming in. So it looks a bit redundant now, but think of "unreachable" testing for !col at least ;-)

K-Wu added inline comments.May 24 2023, 9:47 PM
mlir/lib/Dialect/SparseTensor/Transforms/SparseGPUCodegen.cpp
392

okay that makes sense. Thank you.

K-Wu accepted this revision.May 24 2023, 9:48 PM

LGTM

This revision is now accepted and ready to land.May 24 2023, 9:48 PM
This revision was automatically updated to reflect the committed changes.