-
Notifications
You must be signed in to change notification settings - Fork 14.9k
[mlir][nvgpu] Move dependent dialect from C++ to TableGen for nvgpu-to-nvvm pass (NFC) #155801
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
[mlir][nvgpu] Move dependent dialect from C++ to TableGen for nvgpu-to-nvvm pass (NFC) #155801
Conversation
@llvm/pr-subscribers-mlir-nvgpu @llvm/pr-subscribers-mlir-gpu Author: lonely eagle (linuxlonelyeagle) ChangesRemoved the getDependentDialects function from the convert-nvgpu-to-nvvm pass and instead use TableGen to define dependent dialects. Full diff: https://github.com/llvm/llvm-project/pull/155801.diff 3 Files Affected:
diff --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td
index 2058aba7f9e37..ce9a47f366305 100644
--- a/mlir/include/mlir/Conversion/Passes.td
+++ b/mlir/include/mlir/Conversion/Passes.td
@@ -970,7 +970,10 @@ def ConvertNVGPUToNVVMPass : Pass<"convert-nvgpu-to-nvvm"> {
}];
let dependentDialects = [
- "NVVM::NVVMDialect",
+ "arith::ArithDialect",
+ "LLVM::LLVMDialect",
+ "memref::MemRefDialect",
+ "NVVM::NVVMDialect"
];
}
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"
diff --git a/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp b/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
index c6c5ab356f256..09f506ad40b17 100644
--- a/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
+++ b/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
@@ -396,11 +396,6 @@ struct ConvertNVGPUToNVVMPass
: public impl::ConvertNVGPUToNVVMPassBase<ConvertNVGPUToNVVMPass> {
using Base::Base;
- void getDependentDialects(DialectRegistry ®istry) const override {
- registry.insert<memref::MemRefDialect, LLVM::LLVMDialect, NVVM::NVVMDialect,
- arith::ArithDialect>();
- }
-
void runOnOperation() override {
LowerToLLVMOptions options(&getContext());
RewritePatternSet patterns(&getContext());
|
@llvm/pr-subscribers-mlir Author: lonely eagle (linuxlonelyeagle) ChangesRemoved the getDependentDialects function from the convert-nvgpu-to-nvvm pass and instead use TableGen to define dependent dialects. Full diff: https://github.com/llvm/llvm-project/pull/155801.diff 3 Files Affected:
diff --git a/mlir/include/mlir/Conversion/Passes.td b/mlir/include/mlir/Conversion/Passes.td
index 2058aba7f9e37..ce9a47f366305 100644
--- a/mlir/include/mlir/Conversion/Passes.td
+++ b/mlir/include/mlir/Conversion/Passes.td
@@ -970,7 +970,10 @@ def ConvertNVGPUToNVVMPass : Pass<"convert-nvgpu-to-nvvm"> {
}];
let dependentDialects = [
- "NVVM::NVVMDialect",
+ "arith::ArithDialect",
+ "LLVM::LLVMDialect",
+ "memref::MemRefDialect",
+ "NVVM::NVVMDialect"
];
}
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"
diff --git a/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp b/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
index c6c5ab356f256..09f506ad40b17 100644
--- a/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
+++ b/mlir/lib/Conversion/NVGPUToNVVM/NVGPUToNVVM.cpp
@@ -396,11 +396,6 @@ struct ConvertNVGPUToNVVMPass
: public impl::ConvertNVGPUToNVVMPassBase<ConvertNVGPUToNVVMPass> {
using Base::Base;
- void getDependentDialects(DialectRegistry ®istry) const override {
- registry.insert<memref::MemRefDialect, LLVM::LLVMDialect, NVVM::NVVMDialect,
- arith::ArithDialect>();
- }
-
void runOnOperation() override {
LowerToLLVMOptions options(&getContext());
RewritePatternSet patterns(&getContext());
|
LGTM. Please wait for @grypp 's review. |
Removed the getDependentDialects function from the convert-nvgpu-to-nvvm pass and instead use TableGen to define dependent dialects.