[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 03:45:06 PDT 2020


tpopp created this revision.
tpopp added reviewers: herhut, pifon2a, frgossen.
Herald added subscribers: llvm-commits, Kayjukh, grosul1, bader, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, csigg, nicolasvasilache, antiagainst, shauheen, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.

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


Repository:
  rG LLVM Github Monorepo

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,12 @@
     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 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.
 
     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 +281,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.259847.patch
Type: text/x-patch
Size: 2636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200424/a977b7c4/attachment.bin>


More information about the llvm-commits mailing list