From 978dec7518fd16f66d4401218f8240b61cdc09f3 Mon Sep 17 00:00:00 2001 From: Tony Tye Date: Thu, 14 Jun 2018 16:40:10 +0000 Subject: [PATCH] [AMDGPU] Document the AMDGPU LLVM attributes Differential Revision: https://reviews.llvm.org/D48101 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334733 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/AMDGPUUsage.rst | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/docs/AMDGPUUsage.rst b/docs/AMDGPUUsage.rst index 773e0742fa9..5c1430732c1 100644 --- a/docs/AMDGPUUsage.rst +++ b/docs/AMDGPUUsage.rst @@ -369,13 +369,42 @@ is conservatively correct for OpenCL. 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 @@ Additional Documentation .. [YAML] `YAML Ain't Markup Language (YAML™) Version 1.2 `__ .. [OpenCL] `The OpenCL Specification Version 2.0 `__ .. [HRF] `Heterogeneous-race-free Memory Models `__ +.. [CLANG-ATTR] `Attributes in Clang `__ -- 2.11.0