[Mlir-commits] [mlir] dfd50f9 - [mlir][nvgpu] Delete nvgpu dialect unused variable kMaxTMALastdimByte (NFC) (#155825)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Sep 22 06:04:52 PDT 2025


Author: lonely eagle
Date: 2025-09-22T21:04:48+08:00
New Revision: dfd50f91f237353deff999275c496113af3f4b2b

URL: https://github.com/llvm/llvm-project/commit/dfd50f91f237353deff999275c496113af3f4b2b
DIFF: https://github.com/llvm/llvm-project/commit/dfd50f91f237353deff999275c496113af3f4b2b.diff

LOG: [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.

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h
    mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h b/mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h
index 61a57fb60bda4..ccee0de65caa5 100644
--- a/mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h
+++ b/mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h
@@ -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"

diff  --git a/mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp b/mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp
index 8474244c7d7c0..697cb35a59a28 100644
--- a/mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp
+++ b/mlir/lib/Dialect/NVGPU/IR/NVGPUDialect.cpp
@@ -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";
   }


        


More information about the Mlir-commits mailing list