Skip to content

Latest commit

 

History

History
63 lines (52 loc) · 2.09 KB

AMDGPUSupport.rst

File metadata and controls

63 lines (52 loc) · 2.09 KB
.none { background-color: #FFCCCC } .part { background-color: #FFFF99 } .good { background-color: #CCFF99 }

Clang supports OpenCL, HIP and OpenMP on AMD GPU targets.

MacroDescription
__AMDGPU__Indicates that the code is being compiled for an AMD GPU.
__AMDGCN__Defined if the GPU target is AMDGCN.
__R600__Defined if the GPU target is R600.
__<ArchName>__Defined with the name of the architecture (e.g., __gfx906__ for the gfx906 architecture).
__<GFXN>__Defines the GFX family (e.g., for gfx906, this macro would be __GFX9__).
__amdgcn_processor__Defined with the processor name as a string (e.g., "gfx906").
__amdgcn_target_id__Defined with the target ID as a string.
__amdgcn_feature_<feature-name>__Defined for each supported target feature. The value is 1 if the feature is enabled and 0 if it is disabled. Allowed feature names are sramecc and xnack.
__AMDGCN_CUMODE__Defined as 1 if the CU mode is enabled and 0 if the WGP mode is enabled.
__AMDGCN_UNSAFE_FP_ATOMICS__Defined if unsafe floating-point atomics are allowed.
__AMDGCN_WAVEFRONT_SIZE__Defines the wavefront size. Allowed values are 32 and 64 (deprecated).
__AMDGCN_WAVEFRONT_SIZEAlias to __AMDGCN_WAVEFRONT_SIZE__ (deprecated).
__HAS_FMAF__Defined if FMAF instruction is available (deprecated).
__HAS_LDEXPF__Defined if LDEXPF instruction is available (deprecated).
__HAS_FP64__Defined if FP64 instruction is available (deprecated).

Please note that the specific architecture and feature names will vary depending on the GPU. Also, some macros are deprecated and may be removed in future releases.

close