P4 to Git Change 1518288 by rili@rili-new-stg-pal-opencl on 2018/02/22 11:48:27

SWDEV-145977 - Add RV2 support

	Code Review: http://ocltc.amd.com/reviews/r/14280/

Affected files ...

... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#151 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#584 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#359 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#182 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/caltarget.h#7 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#44 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIFEnumCheck.cpp#29 edit
This commit is contained in:
foreman
2018-02-22 12:09:33 -05:00
parent 7b2c30bd6d
commit 633ed0a02d
7 changed files with 17 additions and 6 deletions
+4 -2
View File
@@ -153,8 +153,10 @@ static const AMDDeviceInfo DeviceInfo[] = {
64 * Ki, 32, 800},
/* CAL_TARGET_LEXA */ {ED_ATI_CAL_MACHINE_LEXA_ISA, "gfx804", "gfx804", 4, 16, 1, 256, 64 * Ki,
32, 800},
/* CAL_TARGET_RAVEN */ {ED_ATI_CAL_MACHINE_RAVEN_ISA, IF(IS_BRAHMA, "", "gfx901"),
IF(IS_BRAHMA, "", "gfx901"), 4, 16, 1, 256, 64 * Ki, 32, 900},
/* CAL_TARGET_RAVEN */ {ED_ATI_CAL_MACHINE_RAVEN_ISA, IF(IS_BRAHMA, "", "gfx902"),
IF(IS_BRAHMA, "", "gfx902"), 4, 16, 1, 256, 64 * Ki, 32, 900},
/* CAL_TARGET_RAVEN2 */ {ED_ATI_CAL_MACHINE_RAVEN2_ISA, IF(IS_BRAHMA, "", "gfx902"),
IF(IS_BRAHMA, "", "gfx902"), 4, 16, 1, 256, 64 * Ki, 32, 900},
/* CAL_TARGET_POLARIS22 */ {ED_ATI_CAL_MACHINE_POLARIS22_ISA, IF(IS_BRAHMA, "", "gfx804"),
IF(IS_BRAHMA, "", "gfx804"), 4, 16, 1, 256, 64 * Ki, 32, 800},
/* CAL_TARGET_VEGA12 */{ ED_ATI_CAL_MACHINE_VEGA12_ISA, IF(IS_BRAHMA, "", "gfx904"),
+3 -2
View File
@@ -166,6 +166,7 @@ bool NullDevice::create(CALtarget target) {
case CAL_TARGET_STONEY:
case CAL_TARGET_LEXA:
case CAL_TARGET_RAVEN:
case CAL_TARGET_RAVEN2:
case CAL_TARGET_POLARIS22:
case CAL_TARGET_VEGA12:
case CAL_TARGET_VEGA20:
@@ -854,13 +855,13 @@ bool Device::create(CALuint ordinal, CALuint numOfDevices) {
if ((GPU_ENABLE_PAL == 2) &&
(calTarget_ == CAL_TARGET_GREENLAND || calTarget_ == CAL_TARGET_RAVEN ||
calTarget_ >= CAL_TARGET_VEGA12)) {
calTarget_ == CAL_TARGET_RAVEN2 || calTarget_ >= CAL_TARGET_VEGA12)) {
return false;
}
#if defined(BRAHMA)
if (calTarget_ == CAL_TARGET_GREENLAND || calTarget_ == CAL_TARGET_RAVEN ||
calTarget_ == CAL_TARGET_POLARIS22) {
calTarget_ == CAL_TARGET_RAVEN2 || calTarget_ == CAL_TARGET_POLARIS22) {
return false;
}
#endif
@@ -161,6 +161,7 @@ bool Settings::create(const CALdeviceattribs& calAttr, bool reportAsOCL12Device,
switch (target) {
case CAL_TARGET_RAVEN:
case CAL_TARGET_RAVEN2:
// APU systems for AI
apuSystem_ = true;
case CAL_TARGET_GREENLAND:
@@ -511,6 +511,10 @@ CALGSLDevice::SetupContext(int32 &asic_id)
m_target = CAL_TARGET_RAVEN;
m_elfmachine = ED_ATI_CAL_MACHINE_RAVEN_ISA;
break;
case GSL_ATIASIC_ID_RAVEN2:
m_target = CAL_TARGET_RAVEN2;
m_elfmachine = ED_ATI_CAL_MACHINE_RAVEN2_ISA;
break;
case GSL_ATIASIC_ID_POLARIS22:
m_target = CAL_TARGET_POLARIS22;
m_elfmachine = ED_ATI_CAL_MACHINE_POLARIS22_ISA;
@@ -47,6 +47,7 @@ typedef enum CALtargetEnum {
CAL_TARGET_STONEY, /**< STONEY GPU ISA*/
CAL_TARGET_LEXA, /**< LEXA GPU ISA*/
CAL_TARGET_RAVEN, /**< RAVEN GPU ISA*/
CAL_TARGET_RAVEN2, /**< RAVEN2 GPU ISA*/
CAL_TARGET_POLARIS22, /**< POLARIS22 GPU ISA*/
CAL_TARGET_VEGA12, /**< VEGA12 GPU ISA*/
CAL_TARGET_VEGA20, /**< VEGA20 GPU ISA*/
+3 -2
View File
@@ -163,8 +163,9 @@ static const AMDDeviceInfo Gfx9PlusSubDeviceInfo[] = {
/* Raven */{"gfx902", "gfx902", 4, 16, 1, 256, 64 * Ki, 32, 902},
/* Raven XNACK */{ LIGHTNING_SWITCH("gfx902","gfx903"), LIGHTNING_SWITCH("gfx902","gfx903"),
4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(902, 903)},
/* Raven2 */{"" , "" , 0, 0 , 0, 0 , 0 , 0 , 0},
/* Raven2 XNACK */{"" , "" , 0, 0 , 0, 0 , 0 , 0 , 0},
/* Raven2 */{"gfx902", "gfx902", 4, 16, 1, 256, 64 * Ki, 32, 902},
/* Raven2 XNACK */{ LIGHTNING_SWITCH("gfx902","gfx903"), LIGHTNING_SWITCH("gfx902","gfx903"),
4, 16, 1, 256, 64 * Ki, 32, LIGHTNING_SWITCH(902, 903)},
/* Navi10 */{ "", "", 4, 16, 1, 256, 64 * Ki, 32, 1000},
/* Navi10 XNACK */{ "", "", 4, 16, 1, 256, 64 * Ki, 32, 1001},
};
@@ -186,6 +186,7 @@ bool Settings::create(const Pal::DeviceProperties& palProp,
case Pal::AsicRevision::Vega12:
case Pal::AsicRevision::Vega10:
case Pal::AsicRevision::Raven:
case Pal::AsicRevision::Raven2:
aiPlus_ = true;
// Fall through to VI ...
case Pal::AsicRevision::Carrizo: