-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[mlir][nvgpu] Delete nvgpu dialect unused variable kMaxTMALastdimByte (NFC) #155825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[mlir][nvgpu] Delete nvgpu dialect unused variable kMaxTMALastdimByte (NFC) #155825
Conversation
@llvm/pr-subscribers-mlir-nvgpu @llvm/pr-subscribers-mlir-gpu Author: lonely eagle (linuxlonelyeagle) ChangesSince the size of the last dimension of TMA is no longer fixed at 128 bytes, remove the kMaxTMALastdimByte. Full diff: https://github.com/llvm/llvm-project/pull/155825.diff 1 Files Affected:
diff --git a/mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h b/mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h
index 61a57fb60bda4..b07e1a5beb866 100644
--- a/mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h
+++ b/mlir/include/mlir/Dialect/NVGPU/IR/NVGPUDialect.h
@@ -46,8 +46,6 @@ 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;
#define GET_ATTRDEF_CLASSES
#include "mlir/Dialect/NVGPU/IR/NVGPUAttrDefs.h.inc"
|
#153451 In this PR, I forgot to remove kMaxTMALastdimByte. Sorry. |
@@ -46,8 +46,6 @@ 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make it 16 and use it in the code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, I don't quite understand your intention.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do this
/// Last dimension of 2D+ TMA must be 128 bytes
constexpr unsigned kMaxTMALastdimByte = 16;
int lastDimBytes =
descMemref.getShape().back() * descMemref.getElementTypeBitWidth() / 8;
if (lastDimBytes % kMaxTMALastdimByte != 0) {
return op->emitError() << "the bytes in the last dimension of the tensor "
"map must be a multiple of 16";
}
#152160 This PR must have forgotten to remove the unused variables. I pasted the wrong link above. |
Since the size of the last dimension of TMA is no longer fixed at 128 bytes, remove the kMaxTMALastdimByte.