[Mlir-commits] [mlir] 49d8625 - [MLIR] Remove document references to gpu.kernel_module and gpu.kernel.

Tres Popp llvmlistbot at llvm.org
Mon Apr 27 01:01:13 PDT 2020


Author: Tres Popp
Date: 2020-04-27T10:00:15+02:00
New Revision: 49d8625aefb8d94afdaf340d6c4363d26b8133ba

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

LOG: [MLIR] Remove document references to gpu.kernel_module and gpu.kernel.

Summary:
These have been replaced from attributes to operations gpu.module and
gpu.func respectively.

Differential Revision: https://reviews.llvm.org/D78803

Added: 
    

Modified: 
    mlir/docs/Dialects/SPIR-V.md
    mlir/include/mlir/Dialect/GPU/GPUOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/docs/Dialects/SPIR-V.md b/mlir/docs/Dialects/SPIR-V.md
index 41b07954b4a5..eb9d18b3b7e2 100644
--- a/mlir/docs/Dialects/SPIR-V.md
+++ b/mlir/docs/Dialects/SPIR-V.md
@@ -1072,9 +1072,8 @@ Using the above infrastructure, conversions are implemented from
 
 *   [Standard Dialect][MlirStandardDialect] : Only arithmetic and logical
     operations conversions are implemented.
-*   [GPU Dialect][MlirGpuDialect] : A module with the attribute
-    `gpu.kernel_module` is converted to a `spv.module`. A function within this
-    module with the attribute `gpu.kernel` is lowered as an entry function.
+*   [GPU Dialect][MlirGpuDialect] : A gpu.module is converted to a `spv.module`.
+    A gpu.function within this module is lowered as an entry function.
 
 ## Code organization
 

diff  --git a/mlir/include/mlir/Dialect/GPU/GPUOps.td b/mlir/include/mlir/Dialect/GPU/GPUOps.td
index 7254f0fc425d..c65c6c5f44aa 100644
--- a/mlir/include/mlir/Dialect/GPU/GPUOps.td
+++ b/mlir/include/mlir/Dialect/GPU/GPUOps.td
@@ -260,13 +260,11 @@ def GPU_LaunchFuncOp : GPU_Op<"launch_func">,
     outlining the kernel body into a function in a dedicated module, which
     reflects the separate compilation process. The kernel function is required
     to have the `gpu.kernel` attribute. The module containing the kernel
-    function is required to have the `gpu.kernel_module` attribute and must be
-    named. And finally, the module containing the kernel module (which thus
-    cannot be the top-level module) is required to have the
-    `gpu.container_module` attribute. The `gpu.launch_func` operation has a
-    string attribute named `kernel` to specify the name of the kernel function
-    to launch and an attribute named `kernel_module` to specify the name of the
-    module containing that kernel function.
+    function is required to be a gpu.module. And finally, the module containing
+    the kernel module (which thus cannot be the top-level module) is required
+    to have the `gpu.container_module` attribute. The `gpu.launch_func`
+    operation has a symbol attribute named `kernel` to identify the fully specified
+    kernel function to launch (both the gpu.module and func).
 
     The operation takes at least six operands, with the first three operands
     being grid sizes along x,y,z dimensions and the following three being block
@@ -282,7 +280,7 @@ def GPU_LaunchFuncOp : GPU_Op<"launch_func">,
     module attributes {gpu.container_module} {
 
       // This module creates a separate compilation unit for the GPU compiler.
-      module @kernels attributes {gpu.kernel_module} {
+      gpu.module @kernels {
         func @kernel_1(%arg0 : f32, %arg1 : !llvm<"float*">)
             attributes { nvvm.kernel = true } {
 


        


More information about the Mlir-commits mailing list