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

Theodore Popp via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 07:32:14 PDT 2020


tpopp updated this revision to Diff 259884.
tpopp added a comment.

Update comment on the kernel attribute of gpu.launch_func.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78803/new/

https://reviews.llvm.org/D78803

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


Index: mlir/include/mlir/Dialect/GPU/GPUOps.td
===================================================================
--- mlir/include/mlir/Dialect/GPU/GPUOps.td
+++ mlir/include/mlir/Dialect/GPU/GPUOps.td
@@ -260,13 +260,11 @@
     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 @@
     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 } {
 
Index: mlir/docs/Dialects/SPIR-V.md
===================================================================
--- mlir/docs/Dialects/SPIR-V.md
+++ mlir/docs/Dialects/SPIR-V.md
@@ -1072,9 +1072,8 @@
 
 *   [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
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78803.259884.patch
Type: text/x-patch
Size: 2562 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200424/6781255c/attachment.bin>


More information about the llvm-commits mailing list