CLRX  1
An unofficial OpenCL extensions designed for Radeon GPUs
Classes | Namespaces | Enumerations | Functions
GPUId.h File Reference

GPU identification utilities. More...

#include <CLRX/Config.h>
#include <CLRX/utils/Utilities.h>
#include <string>

Go to the source code of this file.

Classes

class  CLRX::GPUIdException
 GPUId exception class. More...
 
struct  CLRX::AMDGPUArchVersion
 structure helper for AMDGPU architecture version More...
 

Namespaces

 CLRX
 main namespace
 

Enumerations

enum  CLRX::GPUDeviceType : cxbyte {
  CLRX::GPUDeviceType::CAPE_VERDE = 0, CLRX::GPUDeviceType::PITCAIRN, CLRX::GPUDeviceType::TAHITI, CLRX::GPUDeviceType::OLAND,
  CLRX::GPUDeviceType::BONAIRE, CLRX::GPUDeviceType::SPECTRE, CLRX::GPUDeviceType::SPOOKY, CLRX::GPUDeviceType::KALINDI,
  CLRX::GPUDeviceType::HAINAN, CLRX::GPUDeviceType::HAWAII, CLRX::GPUDeviceType::ICELAND, CLRX::GPUDeviceType::TONGA,
  CLRX::GPUDeviceType::MULLINS, CLRX::GPUDeviceType::FIJI, CLRX::GPUDeviceType::CARRIZO, DUMMY,
  GOOSE, HORSE, STONEY, ELLESMERE,
  BAFFIN, GFX804, GFX900, GFX901,
  CLRX::GPUDeviceType::GPUDEVICE_MAX = GFX901, CLRX::GPUDeviceType::RADEON_HD7700 = CAPE_VERDE, CLRX::GPUDeviceType::RADEON_HD7800 = PITCAIRN, CLRX::GPUDeviceType::RADEON_HD7900 = TAHITI,
  CLRX::GPUDeviceType::RADEON_R7_250 = OLAND, CLRX::GPUDeviceType::RADEON_R7_260 = BONAIRE, CLRX::GPUDeviceType::RADEON_R9_290 = HAWAII
}
 type of GPU device More...
 
enum  CLRX::GPUArchitecture : cxbyte {
  CLRX::GPUArchitecture::GCN1_0 = 0, CLRX::GPUArchitecture::GCN1_1, CLRX::GPUArchitecture::GCN1_2, CLRX::GPUArchitecture::GCN1_4,
  GPUARCH_MAX = GCN1_4
}
 GPU architecture. More...
 
enum  : Flags { REGCOUNT_NO_VCC = 1, REGCOUNT_NO_FLAT = 2, REGCOUNT_NO_XNACK = 4, REGCOUNT_NO_EXTRA = 0xffff }
 
enum  : cxuint { REGTYPE_SGPR = 0, REGTYPE_VGPR }
 
enum  : Flags { GCN_VCC = 1, GCN_FLAT = 2, GCN_XNACK = 4 }
 
enum  : Flags { GPUSETUP_TGSIZE_EN = 1, GPUSETUP_SCRATCH_EN = 2 }
 
enum  : cxuint { MAX_REGTYPES_NUM = 4 }
 
enum  CLRX::GPUArchVersionTable : cxuint { CLRX::GPUArchVersionTable::AMDCL2 = 0, CLRX::GPUArchVersionTable::OPENSOURCE }
 ADMGPUArchValues table type. More...
 

Functions

GPUDeviceType CLRX::getGPUDeviceTypeFromName (const char *name)
 get GPU device type from name
 
const char * CLRX::getGPUDeviceTypeName (GPUDeviceType deviceType)
 get GPU device type name
 
GPUArchitecture CLRX::getGPUArchitectureFromName (const char *name)
 get GPU architecture from name
 
GPUArchitecture CLRX::getGPUArchitectureFromDeviceType (GPUDeviceType deviceType)
 get GPUArchitecture from GPU device type
 
GPUDeviceType CLRX::getLowestGPUDeviceTypeFromArchitecture (GPUArchitecture arch)
 get lowest GPU device for architecture
 
const char * CLRX::getGPUArchitectureName (GPUArchitecture architecture)
 get GPU architecture name
 
cxuint CLRX::getGPUMaxRegistersNum (GPUArchitecture architecture, cxuint regType, Flags flags=0)
 get maximum available registers for GPU (type: 0 - scalar, 1 - vector)
 
cxuint CLRX::getGPUMaxRegsNumByArchMask (uint16_t archMask, cxuint regType)
 get maximum available registers for GPU (type: 0 - scalar, 1 - vector)
 
void CLRX::getGPUSetupMinRegistersNum (GPUArchitecture architecture, cxuint dimMask, cxuint userDataNum, Flags flags, cxuint *gprsOut)
 get minimal number of required registers
 
size_t CLRX::getGPUMaxLocalSize (GPUArchitecture architecture)
 get maximum local size for GPU architecture
 
size_t CLRX::getGPUMaxGDSSize (GPUArchitecture architecture)
 get maximum GDS size for GPU architecture
 
cxuint CLRX::getGPUExtraRegsNum (GPUArchitecture architecture, cxuint regType, Flags flags)
 get extra registers (like VCC,FLAT_SCRATCH)
 
uint32_t CLRX::calculatePgmRSrc1 (GPUArchitecture arch, cxuint vgprsNum, cxuint sgprsNum, cxuint priority, cxuint floatMode, bool privMode, bool dx10clamp, bool debugMode, bool ieeeMode)
 calculate PGMRSRC1 register value
 
uint32_t CLRX::calculatePgmRSrc2 (GPUArchitecture arch, bool scratchEn, cxuint userDataNum, bool trapPresent, cxuint dimMask, cxuint defDimValues, bool tgSizeEn, cxuint ldsSize, cxuint exceptions)
 calculate PGMRSRC2 register value
 
AMDGPUArchVersion CLRX::getGPUArchVersion (GPUDeviceType deviceType, GPUArchVersionTable table)
 get AMD GPU architecture version for specific device type and driver
 
GPUDeviceType CLRX::getGPUDeviceTypeFromArchVersion (cxuint archMajor, cxuint archMinor, cxuint archStepping)
 

Detailed Description

GPU identification utilities.