[PATCH] D48101: [AMDGPU] Document the AMDGPU LLVM attributes

Tony Tye via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 14 09:44:46 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL334733: [AMDGPU] Document the AMDGPU LLVM attributes (authored by t-tye, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D48101?vs=151047&id=151368#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D48101

Files:
  llvm/trunk/docs/AMDGPUUsage.rst


Index: llvm/trunk/docs/AMDGPUUsage.rst
===================================================================
--- llvm/trunk/docs/AMDGPUUsage.rst
+++ llvm/trunk/docs/AMDGPUUsage.rst
@@ -369,13 +369,42 @@
 AMDGPU Intrinsics
 -----------------
 
-The AMDGPU backend implements the following intrinsics.
+The AMDGPU backend implements the following LLVM IR intrinsics.
 
 *This section is WIP.*
 
 .. TODO
    List AMDGPU intrinsics
 
+AMDGPU Attributes
+-----------------
+
+The AMDGPU backend supports the following LLVM IR attributes.
+
+  .. table:: AMDGPU LLVM IR Attributes
+     :name: amdgpu-llvm-ir-attributes-table
+
+     ======================================= ==========================================================
+     LLVM Attribute                          Description
+     ======================================= ==========================================================
+     "amdgpu-flat-work-group-size"="min,max" Specify the minimum and maximum flat work group sizes that
+                                             will be specified when the kernel is dispatched. Generated
+                                             by the ``amdgpu_flat_work_group_size`` CLANG attribute [CLANG-ATTR]_.
+     "amdgpu-implicitarg-num-bytes"="n"      Number of kernel argument bytes to add to the kernel
+                                             argument block size for the implicit arguments. This
+                                             varies by OS and language (for OpenCL see
+                                             :ref:`opencl-kernel-implicit-arguments-appended-for-amdhsa-os-table`).
+     "amdgpu-max-work-group-size"="n"        Specify the maximum work-group size that will be specifed
+                                             when the kernel is dispatched.
+     "amdgpu-num-sgpr"="n"                   Specifies the number of SGPRs to use. Generated by
+                                             the ``amdgpu_num_sgpr`` CLANG attribute [CLANG-ATTR]_.
+     "amdgpu-num-vgpr"="n"                   Specifies the number of VGPRs to use. Generated by the
+                                             ``amdgpu_num_vgpr`` CLANG attribute [CLANG-ATTR]_.
+     "amdgpu-waves-per-eu"="m,n"             Specify the minimum and maximum number of waves per
+                                             execution unit. Generated by the ``amdgpu_waves_per_eu``
+                                             CLANG attribute [CLANG-ATTR]_.
+     ======================================= ==========================================================
+
 Code Object
 ===========
 
@@ -4343,3 +4372,4 @@
 .. [YAML] `YAML Ain't Markup Language (YAML™) Version 1.2 <http://www.yaml.org/spec/1.2/spec.html>`__
 .. [OpenCL] `The OpenCL Specification Version 2.0 <http://www.khronos.org/registry/cl/specs/opencl-2.0.pdf>`__
 .. [HRF] `Heterogeneous-race-free Memory Models <http://benedictgaster.org/wp-content/uploads/2014/01/asplos269-FINAL.pdf>`__
+.. [CLANG-ATTR] `Attributes in Clang <http://clang.llvm.org/docs/AttributeReference.html>`__


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48101.151368.patch
Type: text/x-patch
Size: 3068 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180614/bea5d611/attachment.bin>


More information about the llvm-commits mailing list