fb77623fce
SWDEV-94637 - Add the logic to select the control function libraries. Add a gfxipVersion field to the DeviceInfo. Generate both CL1.2 and CL2.0 precompiled headers. Set the -mcpu target using the DeviceInfo.machineTarget_.
Affected files ...
... //depot/stg/opencl/drivers/opencl/library/build/Makefile.library#51 edit
... //depot/stg/opencl/drivers/opencl/make/amdgcn.git/headers/build/Makefile.headers#2 edit
... //depot/stg/opencl/drivers/opencl/make/amdgcn.git/irif/build/Makefile.irif#3 edit
... //depot/stg/opencl/drivers/opencl/make/amdgcn.git/ockl/build/Makefile.ockl#4 edit
... //depot/stg/opencl/drivers/opencl/make/amdgcn.git/oclc/build/Makefile.oclc#4 edit
... //depot/stg/opencl/drivers/opencl/make/amdgcn.git/ocml/build/Makefile.ocml#4 edit
... //depot/stg/opencl/drivers/opencl/make/amdgcn.git/opencl/build/Makefile.opencl#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdefs.hpp#5 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.cpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocprogram.cpp#10 edit
[ROCm/clr commit: d05240f908]
51 lines
2.4 KiB
C++
51 lines
2.4 KiB
C++
#pragma once
|
|
|
|
#ifndef WITHOUT_HSA_BACKEND
|
|
|
|
namespace roc {
|
|
|
|
typedef uint HsaDeviceId;
|
|
|
|
struct AMDDeviceInfo {
|
|
HsaDeviceId hsaDeviceId_; //!< Machine id
|
|
const char* targetName_; //!< Target name for compilation
|
|
const char* machineTarget_; //!< Machine target
|
|
uint simdPerCU_; //!< Number of SIMDs per CU
|
|
uint simdWidth_; //!< Number of workitems processed per SIMD
|
|
uint simdInstructionWidth_; //!< Number of instructions processed per SIMD
|
|
uint memChannelBankWidth_; //!< Memory channel bank width
|
|
uint localMemSizePerCU_; //!< Local memory size per CU
|
|
uint localMemBanks_; //!< Number of banks of local memory
|
|
uint gfxipVersion_; //!< The core engine GFXIP version
|
|
uint pciDeviceId_; //!< PCIe device id
|
|
};
|
|
|
|
//The device ID must match with the device's index into DeviceInfo
|
|
const HsaDeviceId HSA_SPECTRE_ID = 0;
|
|
const HsaDeviceId HSA_SPOOKY_ID = 1;
|
|
const HsaDeviceId HSA_TONGA_ID = 2;
|
|
const HsaDeviceId HSA_CARRIZO_ID = 3;
|
|
const HsaDeviceId HSA_ICELAND_ID = 4;
|
|
const HsaDeviceId HSA_FIJI_ID = 5;
|
|
const HsaDeviceId HSA_HAWAII_ID = 6;
|
|
const HsaDeviceId HSA_ELLESMERE_ID = 7;
|
|
const HsaDeviceId HSA_BAFFIN_ID = 8;
|
|
const HsaDeviceId HSA_INVALID_DEVICE_ID = -1;
|
|
|
|
static const AMDDeviceInfo DeviceInfo[] = {
|
|
// targetName machineTarget
|
|
/* TARGET_KAVERI_SPECTRE */ {HSA_SPECTRE_ID, "Spectre", "kaveri", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
|
|
/* TARGET_KAVERI_SPOOKY */ {HSA_SPOOKY_ID, "Spooky", "kaveri", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
|
|
/* TARGET_TONGA */ {HSA_TONGA_ID, "Tonga", "tonga", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
|
|
/* TARGET_CARRIZO */ {HSA_CARRIZO_ID, "Carrizo", "carrizo", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
|
|
/* TARGET_ICELAND */ {HSA_ICELAND_ID, "Topaz", "iceland", 4, 16, 1, 256, 64 * Ki, 32, 0, 0},
|
|
/* TARGET_FIJI */ {HSA_FIJI_ID, "Fiji", "fiji", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
|
|
/* TARGET HAWAII */ {HSA_HAWAII_ID, "Hawaii", "hawaii", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
|
|
/* TARGET ELLESMERE */ {HSA_ELLESMERE_ID, "Ellesmere", "polaris10", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 },
|
|
/* TARGET BAFFIN */ {HSA_BAFFIN_ID, "Baffin", "polaris11", 4, 16, 1, 256, 64 * Ki, 32, 0, 0 }
|
|
};
|
|
|
|
}
|
|
#endif
|
|
|