This is an archive of the discontinued LLVM Phabricator instance.

[mlir][gpu][nvvm] fixed bug with literal for inline asm for mma instruction
ClosedPublic

Authored by aartbik on Mar 14 2023, 9:46 PM.

Details

Summary

The 'mma.sp.sync.aligned' family of instructions expects
the sparsity selector as a direct literal (0x0 or 0x1).
The current MLIR inline asm passed this as a value in
register, which broke the downstream assemblers

This is a small step towards supporting 2:4 sparsity on
NVidia GPUs in the sparse compiler of MLIR.

Diff Detail

Event Timeline

aartbik created this revision.Mar 14 2023, 9:46 PM
aartbik requested review of this revision.Mar 14 2023, 9:46 PM
aartbik retitled this revision from [mlir][gpu][nvvm] fix bug with literal for inline asm for mma instruction to [mlir][gpu][nvvm] fixed bug with literal for inline asm for mma instruction.
ThomasRaoux accepted this revision.Mar 15 2023, 9:10 AM

LGTM but it would be good to have @christopherbate's opinion

This revision is now accepted and ready to land.Mar 15 2023, 9:10 AM

LGTM but it would be good to have @christopherbate's opinion

Thanks Thomas. I will wait for Chris to chime in too.

guraypp accepted this revision.Mar 17 2023, 1:08 AM

Yes, the instruction expects 0x0 or 0x1. The change looks good to me (although I am not authority here :) )

It would be nice to test 0x1 case as well.

It would be nice to test 0x1 case as well.

Ah, sure, I will follow up with that!

Thanks so much! I'm not sure how I didn't catch this sooner. Change LGTM. I'll send an updated integration test for the other diff.