Skip to content

Commit dfd50f9

Browse files
[mlir][nvgpu] Delete nvgpu dialect unused variable kMaxTMALastdimByte (NFC) (#155825)
Since the size of the last dimension of TMA is no longer fixed at 128 bytes, remove the kMaxTMALastdimByte.
1 parent 00ad9ec commit dfd50f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ constexpr unsigned kMaxTMATensorDimension = 5;
4646
/// to be traversed along each of the kMaxTMATensorDimension (tensorRank)
4747
/// dimensions, must be non-zero and less than or equal to 256.
4848
constexpr unsigned kMaxTMADimension = 256;
49-
/// Last dimension of 2D+ TMA must be 128 bytes
50-
constexpr unsigned kMaxTMALastdimByte = 128;
49+
/// The bytes in the last dimension of the tensor map must be a multiple of 16.
50+
constexpr unsigned kTMALastdimByte = 16;
5151

5252
#define GET_ATTRDEF_CLASSES
5353
#include "mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.h.inc"

mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ std::optional<InFlightDiagnostic> verifyTmaDescriptorWithMemref(
424424

425425
int lastDimBytes =
426426
descMemref.getShape().back() * descMemref.getElementTypeBitWidth() / 8;
427-
if (lastDimBytes % 16 != 0) {
427+
if (lastDimBytes % kTMALastdimByte != 0) {
428428
return op->emitError() << "the bytes in the last dimension of the tensor "
429429
"map must be a multiple of 16";
430430
}

0 commit comments

Comments
 (0)