LLVM 20.0.0git
|
Defines various target-specific GPU grid values that must be consistent between host RTL (plugin), device RTL, and clang. More...
#include "llvm/Frontend/OpenMP/OMPGridValues.h"
Public Member Functions | |
constexpr unsigned | warpSlotSize () const |
constexpr unsigned | maxWarpNumber () const |
Public Attributes | |
unsigned | GV_Slot_Size |
The size reserved for data in a shared memory slot. | |
unsigned | GV_Warp_Size |
The default value of maximum number of threads in a worker warp. | |
unsigned | GV_Max_Teams |
the maximum number of teams. | |
unsigned | GV_Default_Num_Teams |
unsigned | GV_SimpleBufferSize |
unsigned | GV_Max_WG_Size |
unsigned | GV_Default_WG_Size |
Defines various target-specific GPU grid values that must be consistent between host RTL (plugin), device RTL, and clang.
We can change grid values for a "fat" binary so that different passes get the correct values when generating code for a multi-target binary. Both amdgcn and nvptx values are stored in this file. In the future, should there be differences between GPUs of the same architecture, then simply make a different array and use the new array name.
Example usage in clang: const unsigned slot_size = ctx.GetTargetInfo().getGridValue().GV_Warp_Size;
Example usage in libomptarget/deviceRTLs: #include "llvm/Frontend/OpenMP/OMPGridValues.h" #ifdef AMDGPU #define GRIDVAL AMDGPUGridValues else #define GRIDVAL NVPTXGridValues #endif ... Then use this reference for GV_Warp_Size in the deviceRTL source. llvm::omp::GRIDVAL().GV_Warp_Size
Example usage in libomptarget hsa plugin: #include "llvm/Frontend/OpenMP/OMPGridValues.h" #define GRIDVAL AMDGPUGridValues ... Then use this reference to access GV_Warp_Size in the hsa plugin. llvm::omp::GRIDVAL().GV_Warp_Size
Example usage in libomptarget cuda plugin: #include "llvm/Frontend/OpenMP/OMPGridValues.h" #define GRIDVAL NVPTXGridValues ... Then use this reference to access GV_Warp_Size in the cuda plugin. llvm::omp::GRIDVAL().GV_Warp_Size
Definition at line 57 of file OMPGridValues.h.
|
inlineconstexpr |
Definition at line 81 of file OMPGridValues.h.
References GV_Max_WG_Size, and GV_Warp_Size.
|
inlineconstexpr |
Definition at line 63 of file OMPGridValues.h.
References GV_Slot_Size, and GV_Warp_Size.
unsigned llvm::omp::GV::GV_Default_Num_Teams |
Definition at line 70 of file OMPGridValues.h.
unsigned llvm::omp::GV::GV_Default_WG_Size |
Definition at line 79 of file OMPGridValues.h.
unsigned llvm::omp::GV::GV_Max_Teams |
the maximum number of teams.
Definition at line 68 of file OMPGridValues.h.
unsigned llvm::omp::GV::GV_Max_WG_Size |
Definition at line 77 of file OMPGridValues.h.
Referenced by maxWarpNumber().
unsigned llvm::omp::GV::GV_SimpleBufferSize |
Definition at line 75 of file OMPGridValues.h.
unsigned llvm::omp::GV::GV_Slot_Size |
The size reserved for data in a shared memory slot.
Definition at line 59 of file OMPGridValues.h.
Referenced by warpSlotSize().
unsigned llvm::omp::GV::GV_Warp_Size |
The default value of maximum number of threads in a worker warp.
Definition at line 61 of file OMPGridValues.h.
Referenced by maxWarpNumber(), and warpSlotSize().