|
clang 24.0.0git
|
A processor an offloading action can target. More...
#include "clang/Basic/OffloadArch.h"
Public Types | |
| enum class | TargetArch : uint8_t { Unused , Unknown , NVPTX , AMDGPU , AMDGCNSPIRV , IntelCPU , IntelGPU , IntelIGCA , Generic } |
Public Member Functions | |
| constexpr | OffloadArch ()=default |
| TargetArch | targetArch () const |
| bool | isNVPTX () const |
| bool | isAMDGPU () const |
| bool | isAMDGCNSPIRV () const |
| bool | isIntelCPU () const |
| bool | isIntelGPU () const |
| bool | isIntelIGCA () const |
| bool | isIntel () const |
| bool | isGeneric () const |
| bool | isUnused () const |
| bool | isUnknown () const |
| llvm::NVPTX::GPUKind | nvptxKind () const |
| llvm::AMDGPU::GPUKind | amdgpuKind () const |
| llvm::IntelGPU::GPUKind | intelGPUKind () const |
| Which Intel GPU this is; only meaningful when isIntelGPU(). | |
| llvm::IntelGPU::IGCATarget | igcaTarget () const |
| Which IGCA target this is; only valid when isIntelIGCA(). | |
| bool | operator== (const OffloadArch &Other) const |
| bool | operator!= (const OffloadArch &Other) const |
| bool | operator< (const OffloadArch &Other) const |
Static Public Member Functions | |
| static OffloadArch | getNVPTX (llvm::NVPTX::GPUKind K) |
| static OffloadArch | getAMDGPU (llvm::AMDGPU::GPUKind K) |
| static OffloadArch | getIntelGPU (llvm::IntelGPU::GPUKind K) |
| An Intel GPU, named by its entry in the TargetParser device list. | |
| static OffloadArch | getIntelIGCA (llvm::IntelGPU::IGCATarget T) |
An Intel IGCA target, e.g. igca_20ca; T must be valid. | |
| static constexpr OffloadArch | getIntelCPU () |
| Intel CPU offload, which has a single target, so no kind is needed. | |
| static constexpr OffloadArch | getUnused () |
| static constexpr OffloadArch | getUnknown () |
| static constexpr OffloadArch | getAMDGCNSPIRV () |
| static constexpr OffloadArch | getGeneric () |
| static OffloadArch | CudaDefault () |
| Default architectures used when the user does not specify one. | |
| static OffloadArch | HIPDefault () |
A processor an offloading action can target.
This is a tagged handle pairing a TargetArch with the matching TargetParser GPU kind; it does not enumerate individual GPUs, so new targets are added in the TargetParser data alone.
Definition at line 36 of file OffloadArch.h.
|
strong |
| Enumerator | |
|---|---|
| Unused | |
| Unknown | |
| NVPTX | |
| AMDGPU | |
| AMDGCNSPIRV | |
| IntelCPU | |
| IntelGPU | |
| IntelIGCA | |
| Generic | |
Definition at line 38 of file OffloadArch.h.
|
constexprdefault |
|
inline |
Definition at line 104 of file OffloadArch.h.
Referenced by clang::OffloadArchToString().
|
static |
Default architectures used when the user does not specify one.
Definition at line 20 of file OffloadArch.cpp.
References getNVPTX().
Referenced by clang::driver::Driver::getOffloadArchs(), and clang::driver::toolchains::NVPTXToolChain::TranslateArgs().
|
inlinestaticconstexpr |
Definition at line 78 of file OffloadArch.h.
References AMDGCNSPIRV.
Referenced by clang::StringToOffloadArch().
|
inlinestatic |
Definition at line 63 of file OffloadArch.h.
References AMDGPU, and uint32_t.
Referenced by clang::getSubArchOffloadArch(), HIPDefault(), and clang::StringToOffloadArch().
|
inlinestaticconstexpr |
Definition at line 81 of file OffloadArch.h.
References Generic.
Referenced by clang::driver::Driver::getOffloadArchs(), and clang::StringToOffloadArch().
|
inlinestaticconstexpr |
Intel CPU offload, which has a single target, so no kind is needed.
Definition at line 73 of file OffloadArch.h.
References IntelCPU.
Referenced by clang::StringToOffloadArch().
|
inlinestatic |
An Intel GPU, named by its entry in the TargetParser device list.
Definition at line 67 of file OffloadArch.h.
References IntelGPU, and uint32_t.
Referenced by clang::StringToOffloadArch().
|
static |
An Intel IGCA target, e.g. igca_20ca; T must be valid.
Definition at line 28 of file OffloadArch.cpp.
References IntelIGCA, and clang::T.
Referenced by clang::StringToOffloadArch().
|
inlinestatic |
Definition at line 60 of file OffloadArch.h.
References NVPTX, and uint32_t.
Referenced by CudaDefault(), and clang::StringToOffloadArch().
|
inlinestaticconstexpr |
Definition at line 77 of file OffloadArch.h.
References Unknown.
Referenced by getCanonicalArchString(), clang::getSubArchOffloadArch(), and clang::StringToOffloadArch().
|
inlinestaticconstexpr |
Definition at line 76 of file OffloadArch.h.
References Unused.
Referenced by clang::driver::Driver::getOffloadArchs(), clang::targets::NVPTXTargetInfo::NVPTXTargetInfo(), and clang::StringToOffloadArch().
|
static |
Definition at line 24 of file OffloadArch.cpp.
References getAMDGPU().
Referenced by clang::driver::Driver::getOffloadArchs().
| llvm::IntelGPU::IGCATarget clang::OffloadArch::igcaTarget | ( | ) | const |
Which IGCA target this is; only valid when isIntelIGCA().
Definition at line 33 of file OffloadArch.cpp.
References isIntelIGCA().
Referenced by clang::OffloadArchToString(), and clang::OffloadArchToVirtualArchString().
|
inline |
Which Intel GPU this is; only meaningful when isIntelGPU().
Definition at line 108 of file OffloadArch.h.
Referenced by clang::OffloadArchToString().
|
inline |
Definition at line 91 of file OffloadArch.h.
References AMDGCNSPIRV.
Referenced by clang::MaxVersionForOffloadArch(), and clang::MinVersionForOffloadArch().
|
inline |
Definition at line 90 of file OffloadArch.h.
References AMDGPU.
Referenced by clang::MaxVersionForOffloadArch(), and clang::MinVersionForOffloadArch().
|
inline |
Definition at line 96 of file OffloadArch.h.
References Generic.
|
inline |
Definition at line 95 of file OffloadArch.h.
References isIntelCPU(), isIntelGPU(), and isIntelIGCA().
|
inline |
|
inline |
|
inline |
Definition at line 94 of file OffloadArch.h.
References IntelIGCA.
Referenced by igcaTarget(), and isIntel().
|
inline |
Definition at line 89 of file OffloadArch.h.
References NVPTX.
Referenced by clang::MaxVersionForOffloadArch().
|
inline |
Definition at line 98 of file OffloadArch.h.
References Unknown.
Referenced by clang::driver::tools::NVPTX::Assembler::ConstructJob(), clang::Sema::CreateLaunchBoundsAttr(), clang::driver::Driver::getOffloadArchs(), and clang::MinVersionForOffloadArch().
|
inline |
Definition at line 97 of file OffloadArch.h.
References Unused.
|
inline |
Definition at line 101 of file OffloadArch.h.
Referenced by clang::Sema::CreateLaunchBoundsAttr(), clang::MaxVersionForOffloadArch(), clang::MinVersionForOffloadArch(), clang::OffloadArchToString(), and clang::OffloadArchToVirtualArchString().
|
inline |
Definition at line 117 of file OffloadArch.h.
References clang::Other.
|
inline |
Definition at line 119 of file OffloadArch.h.
References clang::Other.
|
inline |
Definition at line 114 of file OffloadArch.h.
References clang::Other.
|
inline |
Definition at line 87 of file OffloadArch.h.
Referenced by clang::OffloadArchToString(), and clang::OffloadArchToVirtualArchString().