[mlir][NvGpuToNVVM] Fix byte size calculation in async copy lowering
authorChristopher Bate <cbate@nvidia.com>
Tue, 17 May 2022 21:42:47 +0000 (15:42 -0600)
committerChristopher Bate <cbate@nvidia.com>
Mon, 23 May 2022 16:53:51 +0000 (10:53 -0600)
commit7085cb6011d4593f39c6c3369d1e29ff08edc514
tree6ce3f76bbbf816632b9e3c6540fae6dc047256b1
parent82c85bf38e9d0f5c5f81a6e8e7ba9359d9dba906
[mlir][NvGpuToNVVM] Fix byte size calculation in async copy lowering

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.

Differential Revision: https://reviews.llvm.org/D125838
mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
mlir/test/Conversion/NVGPUToNVVM/nvgpu-to-nvvm.mlir