Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ constexpr unsigned kMaxTMATensorDimension = 5;
/// to be traversed along each of the kMaxTMATensorDimension (tensorRank)
/// dimensions, must be non-zero and less than or equal to 256.
constexpr unsigned kMaxTMADimension = 256;
/// Last dimension of 2D+ TMA must be 128 bytes
constexpr unsigned kMaxTMALastdimByte = 128;
/// The bytes in the last dimension of the tensor map must be a multiple of 16.
constexpr unsigned kTMALastdimByte = 16;

#define GET_ATTRDEF_CLASSES
#include "mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.h.inc"
Expand Down
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ std::optional<InFlightDiagnostic> verifyTmaDescriptorWithMemref(

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