This is an archive of the discontinued LLVM Phabricator instance.

[mlir][sparse][gpu]fix various cusparseLt bugs
ClosedPublic

Authored by K-Wu on Jun 8 2023, 5:31 PM.

Diff Detail

Event Timeline

K-Wu created this revision.Jun 8 2023, 5:31 PM
Herald added a reviewer: dcaballe. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
K-Wu updated this revision to Diff 529808.Jun 8 2023, 7:45 PM

fixing

K-Wu updated this revision to Diff 530033.Jun 9 2023, 11:36 AM

fixing bugs

K-Wu updated this revision to Diff 530111.Jun 9 2023, 4:20 PM

fix the bugs

K-Wu published this revision for review.Jun 9 2023, 4:20 PM
aartbik added inline comments.Jun 12 2023, 12:05 PM
mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
284

probably add a create to avoid the upper case start

createSDDMM.....

289–290

This should start with a lower case, e.g. assertSparseLtEnvHandleSizeCallBuilder,
or otherwise add a create, as in createAssert ...

316

SpMM would be more in line with others

1777

remove this empty line for consistency with surrounding code

mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
484–485

isn't it getting a bit expensive to add this call just for an assert that does not even run in prod builds?

aartbik added inline comments.Jun 12 2023, 2:22 PM
mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
484–485

none of these asserts seem runtime specific, right?

So, can't we make this a static_assert(....)

K-Wu updated this revision to Diff 530689.Jun 12 2023, 3:38 PM
K-Wu marked 6 inline comments as done.

rebase origin/main and addressing comments

K-Wu added a comment.Jun 12 2023, 3:39 PM

comments addressed

aartbik accepted this revision.Jun 12 2023, 4:03 PM
aartbik added inline comments.
mlir/lib/Conversion/GPUCommon/GPUToLLVMConversion.cpp
266

keep this lowercase, or use createSpMMBufferSizeCallBuilder

278

create...

1429

we probably want to put these magic constants as symbolic constants, but okay to do that later

mlir/lib/ExecutionEngine/CudaRuntimeWrappers.cpp
493–494

return; not needed

535

is that expected by the lib? if so, please add a comment here

This revision is now accepted and ready to land.Jun 12 2023, 4:03 PM
K-Wu updated this revision to Diff 530701.Jun 12 2023, 4:28 PM
K-Wu marked 3 inline comments as done.

addressing comments

K-Wu marked an inline comment as done.Jun 12 2023, 4:28 PM
K-Wu updated this revision to Diff 530705.Jun 12 2023, 4:38 PM

rebase origin/main

K-Wu updated this revision to Diff 530710.Jun 12 2023, 4:47 PM

fix format

This revision was landed with ongoing or failed builds.Jun 12 2023, 4:48 PM
This revision was automatically updated to reflect the committed changes.