This is an archive of the discontinued LLVM Phabricator instance.

[mlir][NvGpuToNVVM] Fix byte size calculation in async copy lowering
ClosedPublic

Authored by christopherbate on May 17 2022, 2:53 PM.

Details

Summary

AsyncCopyOp lowering converted "size in elements" to "size in bytes"
assuming the element type size is at least one byte. This removes
that restriction, allowing for types such as i4 and b1 to be handled
correctly.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptMay 17 2022, 2:53 PM
christopherbate requested review of this revision.May 17 2022, 2:53 PM
ThomasRaoux added a subscriber: ThomasRaoux.EditedMay 18 2022, 7:54 AM

Thanks for catching this! Is it possible to add a test for it in test/Conversion/NVGPUToNVVM/nvgpu-to-nvvm.mlir?

Added a test for the i4 case.

ThomasRaoux accepted this revision.May 20 2022, 5:17 PM
This revision is now accepted and ready to land.May 20 2022, 5:17 PM