[Mlir-commits] [mlir] dc27d21 - [mlir][nvvm] Use NVVMMemorySpace instead of hardcoded values (nfc)
Guray Ozen
llvmlistbot at llvm.org
Wed Oct 18 06:17:58 PDT 2023
Author: Guray Ozen
Date: 2023-10-18T15:17:51+02:00
New Revision: dc27d21890027e9e0812263f47b0af705005c137
URL: https://github.com/llvm/llvm-project/commit/dc27d21890027e9e0812263f47b0af705005c137
DIFF: https://github.com/llvm/llvm-project/commit/dc27d21890027e9e0812263f47b0af705005c137.diff
LOG: [mlir][nvvm] Use NVVMMemorySpace instead of hardcoded values (nfc)
Added:
Modified:
mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
index 498e70b5392f0b1..92df023c797b1bc 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/NVVMDialect.cpp
@@ -624,7 +624,8 @@ inferMMATypeFromMNK(NVVM::MMATypes type, NVVM::MMAFrag frag, int m, int n,
LogicalResult NVVM::WMMALoadOp::verify() {
unsigned addressSpace =
llvm::cast<LLVM::LLVMPointerType>(getPtr().getType()).getAddressSpace();
- if (addressSpace != 0 && addressSpace != 1 && addressSpace != 3)
+ if (addressSpace != 0 && addressSpace != NVVM::kGlobalMemorySpace &&
+ addressSpace != NVVM::kSharedMemorySpace)
return emitOpError("expected source pointer in memory "
"space 0, 1, 3");
@@ -644,7 +645,8 @@ LogicalResult NVVM::WMMALoadOp::verify() {
LogicalResult NVVM::WMMAStoreOp::verify() {
unsigned addressSpace =
llvm::cast<LLVM::LLVMPointerType>(getPtr().getType()).getAddressSpace();
- if (addressSpace != 0 && addressSpace != 1 && addressSpace != 3)
+ if (addressSpace != 0 && addressSpace != NVVM::kGlobalMemorySpace &&
+ addressSpace != NVVM::kSharedMemorySpace)
return emitOpError("expected operands to be a source pointer in memory "
"space 0, 1, 3");
@@ -696,7 +698,7 @@ LogicalResult NVVM::WMMAMmaOp::verify() {
LogicalResult NVVM::LdMatrixOp::verify() {
unsigned addressSpace =
llvm::cast<LLVM::LLVMPointerType>(getPtr().getType()).getAddressSpace();
- if (addressSpace != 3)
+ if (addressSpace != NVVM::kSharedMemorySpace)
return emitOpError("expected source pointer in memory space 3");
if (getNum() != 1 && getNum() != 2 && getNum() != 4)
More information about the Mlir-commits
mailing list