LLVM 24.0.0git
llvm::IntelGPU Namespace Reference

Classes

class  IGCATarget
 Wrapper around an IGCA target's uint32_t representation, packed using the following format: More...

Enumerations

enum  GPUKind : uint8_t { GK_NONE = 0 }
 Intel GPU architecture names, covering both physical devices and the compatibility names that stand for a whole product line. More...
enum class  IGCAFeatureSet : uint8_t {
  Core = 0b000 , Compute = 0b010 , ComputeExact = 0b011 , Render = 0b100 ,
  RenderExact = 0b101
}
 Represents an IGCA feature set, including whether or not it is exact. More...

Functions

LLVM_ABI StringRef getArchName (uint32_t GPUIPVersion)
LLVM_ABI StringRef getArchName (GPUKind Kind)
LLVM_ABI std::string getNumericArchName (uint32_t GPUIPVersion)
LLVM_ABI GPUKind parseArch (StringRef Name)
LLVM_ABI IGCATarget parseIGCATarget (StringRef MaybeTarget)
 Parse an IGCA target string such as "igca_20ca".
LLVM_ABI StringRef getIGCATargetName (IGCATarget Target)

Enumeration Type Documentation

◆ GPUKind

Intel GPU architecture names, covering both physical devices and the compatibility names that stand for a whole product line.

The underlying type is fixed because clang/Basic/OffloadArch.h forward declares this enumeration; the two declarations have to agree.

Enumerator
GK_NONE 

Definition at line 32 of file IntelGPUTargetParser.h.

◆ IGCAFeatureSet

Represents an IGCA feature set, including whether or not it is exact.

The values are bitfields where the lowest bit represents exact. See IGCATarget for the packed representation.

Enumerator
Core 
Compute 
ComputeExact 
Render 
RenderExact 

Definition at line 43 of file IntelGPUTargetParser.h.

Function Documentation

◆ getArchName() [1/2]

StringRef llvm::IntelGPU::getArchName ( GPUKind Kind)
Returns
the human-friendly name of Kind, e.g. "xe-pvc", or an empty string for GK_NONE.

Definition at line 71 of file IntelGPUTargetParser.cpp.

References GK_NONE, and llvm_unreachable.

◆ getArchName() [2/2]

StringRef llvm::IntelGPU::getArchName ( uint32_t GPUIPVersion)
Returns
the device name that GPUIPVersion identifies, as reported by the driver, e.g. "xe-pvc". If the table lists no such device, return an empty string. Only the major and minor versions are looked at, so every revision of a device resolves to the same name.

Definition at line 54 of file IntelGPUTargetParser.cpp.

References llvm::Device, and GPUIPDeviceMask.

◆ getIGCATargetName()

StringRef llvm::IntelGPU::getIGCATargetName ( IGCATarget Target)
Returns
the Target as a string, e.g. "igca_20ca", or an empty string if Target is invalid.

Definition at line 194 of file IntelGPUTargetParser.cpp.

References T.

◆ getNumericArchName()

std::string llvm::IntelGPU::getNumericArchName ( uint32_t GPUIPVersion)
Returns
the numeric name of GPUIPVersion, e.g. "xe_35.11.0".

Definition at line 63 of file IntelGPUTargetParser.cpp.

References GPUIPMajorShift, GPUIPMinorMask, GPUIPMinorShift, and GPUIPRevisionMask.

◆ parseArch()

GPUKind llvm::IntelGPU::parseArch ( StringRef Name)
Returns
the device Name denotes, or GK_NONE for a name this build does not know.

Name may be a human-friendly name ("xe-pvc"), a compatibility name ("xe-dg2"), an alias ("xe-arl-u") or a numeric name ("xe_12.60.7"). A numeric name must end in a revision, which may be any number and is ignored, so "xe_12.60.0" and "xe_12.60.7" denote the same device.

Definition at line 86 of file IntelGPUTargetParser.cpp.

References llvm::all_of(), llvm::StringSwitch< T, R >::Default(), llvm::Device, GK_NONE, and llvm::isDigit().

◆ parseIGCATarget()

IGCATarget llvm::IntelGPU::parseIGCATarget ( StringRef MaybeTarget)

Parse an IGCA target string such as "igca_20ca".

Returns
an invalid IGCATarget if no device in IntelGPUTargetParser.def can run MaybeTarget, e.g. "igca_10c".

Definition at line 187 of file IntelGPUTargetParser.cpp.

References llvm::IntelGPU::IGCATarget::invalid().