Skip to content

Commit 7aad9fb

Browse files
committed
Small update
1 parent 33fbbc3 commit 7aad9fb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

mlir/lib/Conversion/AMDGPUToROCDL/AMDGPUToROCDL.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,13 +1030,11 @@ struct GatherToLDSOpLowering : public ConvertOpToLLVMPattern<GatherToLDSOp> {
10301030
// TODO: instead of only transfering one element per thread, we could
10311031
// augment it to transfer multiple elements per thread by issuing multiple
10321032
// `global_load_lds` instructions.
1033-
size_t loadWidth;
10341033
Type transferType = op.getTransferType();
1034+
size_t loadWidth = transferType.getIntOrFloatBitWidth() / 8;
10351035
if (auto transferVectorType = dyn_cast<VectorType>(transferType)) {
10361036
loadWidth = transferVectorType.getNumElements() *
10371037
(transferVectorType.getElementTypeBitWidth() / 8);
1038-
} else {
1039-
loadWidth = transferType.getIntOrFloatBitWidth() / 8;
10401038
}
10411039

10421040
// Currently only 1, 2, and 4 byte loads are supported.

0 commit comments

Comments
 (0)