|
11 | 11 |
|
12 | 12 | include "mlir/Pass/PassBase.td" |
13 | 13 |
|
14 | | -def GpuLaunchSinkIndexComputations : Pass<"gpu-launch-sink-index-computations"> { |
| 14 | +def GpuLaunchSinkIndexComputationsPass |
| 15 | + : Pass<"gpu-launch-sink-index-computations"> { |
15 | 16 | let summary = "Sink index computations into gpu.launch body"; |
16 | | - let constructor = "mlir::createGpuLauchSinkIndexComputationsPass()"; |
17 | 17 | let dependentDialects = ["mlir::gpu::GPUDialect"]; |
18 | 18 | } |
19 | 19 |
|
20 | | -def GpuKernelOutlining : Pass<"gpu-kernel-outlining", "ModuleOp"> { |
| 20 | +def GpuKernelOutliningPass : Pass<"gpu-kernel-outlining", "ModuleOp"> { |
21 | 21 | let summary = "Outline gpu.launch bodies to kernel functions"; |
22 | | - let constructor = "mlir::createGpuKernelOutliningPass()"; |
23 | 22 | let dependentDialects = ["mlir::DLTIDialect", "cf::ControlFlowDialect"]; |
| 23 | + let options = [Option<"dataLayoutStr", "data-layout-str", "std::string", |
| 24 | + /*default=*/"", |
| 25 | + "String description of the data layout">]; |
24 | 26 | } |
25 | 27 |
|
26 | 28 | def GpuAsyncRegionPass : Pass<"gpu-async-region", "func::FuncOp"> { |
27 | 29 | let summary = "Make GPU ops async"; |
28 | | - let constructor = "mlir::createGpuAsyncRegionPass()"; |
29 | 30 | let dependentDialects = ["async::AsyncDialect"]; |
30 | 31 | } |
31 | 32 |
|
32 | 33 | def GpuMapParallelLoopsPass |
33 | 34 | : Pass<"gpu-map-parallel-loops", "mlir::func::FuncOp"> { |
34 | 35 | let summary = "Greedily maps loops to GPU hardware dimensions."; |
35 | | - let constructor = "mlir::createGpuMapParallelLoopsPass()"; |
36 | | - let description = "Greedily maps loops to GPU hardware dimensions."; |
| 36 | + let description = [{ |
| 37 | + Maps the parallel loops found in the given function to workgroups. The first |
| 38 | + loop encountered will be mapped to the global workgroup and the second loop |
| 39 | + encountered to the local workgroup. Within each mapping, the first three |
| 40 | + dimensions are mapped to x/y/z hardware ids and all following dimensions are |
| 41 | + mapped to sequential loops. |
| 42 | + }]; |
37 | 43 | let dependentDialects = ["mlir::gpu::GPUDialect"]; |
38 | 44 | } |
39 | 45 |
|
@@ -66,7 +72,6 @@ def GpuDecomposeMemrefsPass : Pass<"gpu-decompose-memrefs"> { |
66 | 72 | and sizes/strides for dynamically-sized memrefs are not available inside |
67 | 73 | `gpu.launch`. |
68 | 74 | }]; |
69 | | - let constructor = "mlir::createGpuDecomposeMemrefsPass()"; |
70 | 75 | let dependentDialects = [ |
71 | 76 | "mlir::gpu::GPUDialect", "mlir::memref::MemRefDialect", |
72 | 77 | "mlir::affine::AffineDialect" |
|
0 commit comments