P4 to Git Change 1342976 by todli@todli-win-opencl-kv1 on 2016/11/17 17:13:47

SWDEV-107271 - [OpenCL][GFXIP9 Bring up] add support for Raven(gfx901)
	Review: http://ocltc.amd.com/reviews/r/11809/

Affected files ...

... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#154 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABI.h#19 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABIMultiBinary.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#49 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#40 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#35 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#65 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#144 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#559 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#348 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#176 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/caltarget.h#4 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.cpp#35 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#11 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIFEnumCheck.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/math/OCLMathFunc.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp#42 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLOfflineCompilation.cpp#18 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLPerfCounters.cpp#35 edit
This commit is contained in:
foreman
2016-11-17 17:25:47 -05:00
parent c52c2ac3ff
commit 2c6bcfbf8d
13 changed files with 39 additions and 8 deletions
@@ -582,7 +582,8 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vector<std::unique_ptr<llvm::Mo
|| chip == "Tahiti"
|| chip == "Hawaii"
|| chip == "Carrizo"
|| chip == "gfx900");
|| chip == "gfx900"
|| chip == "gfx901");
setISAVersion(getIsaType(aclutGetTargetInfo(Elf())));
LLVMBinary()->getContext().setAMDLLVMContextHook(&hookup_);
@@ -585,6 +585,11 @@ int getIsaType(const aclTargetInfo *target)
default: return 900;
case AI_GREENLAND_P_A0: return 900;
}
case FAMILY_RV:
switch (Mapping.chip_enum) {
default: return 901;
case RAVEN_A0: return 901;
}
}
}
@@ -206,7 +206,7 @@ static const char* calTargetMapping[] = {
"Hainan", "Hawaii",
"Iceland", "Tonga", "Mullins", "Fiji",
"Carrizo", "Ellesmere", "Baffin",
"gfx900", "Stoney", "gfx804",
"gfx900", "Stoney", "gfx804", "gfx901",
};
#include "utils/v0_8/target_mappings_amdil.h"
@@ -9,6 +9,7 @@
#include "inc/asic_reg/ci_id.h"
#include "inc/asic_reg/cz_id.h"
#include "inc/asic_reg/ai_id.h"
#include "inc/asic_reg/rv_id.h"
#include "inc/asic_reg/atiid.h"
static const TargetMapping HSAILTargetMapping_0_8[] = {
@@ -32,6 +33,8 @@ static const TargetMapping HSAILTargetMapping_0_8[] = {
{ "VI", "Ellesmere", "GFX8", amd::GPU_Library_HSAIL, VI_ELLESMERE_P_A0, F_VI_BASE, true, true, FAMILY_VI },
{ "AI", "gfx900", "GFX9", amd::GPU_Library_HSAIL, AI_GREENLAND_P_A0, F_AI_BASE, true, true, FAMILY_AI },
{ "VI", "gfx804", "GFX8", amd::GPU_Library_HSAIL, VI_LEXA_V_A0, F_VI_BASE, true, true, FAMILY_VI },
UnknownTarget,
InvalidTarget
};
@@ -8,6 +8,7 @@
#include "inc/asic_reg/kv_id.h"
#include "inc/asic_reg/ci_id.h"
#include "inc/asic_reg/ai_id.h"
#include "inc/asic_reg/rv_id.h"
#include "inc/asic_reg/atiid.h"
static const TargetMapping HSAIL64TargetMapping_0_8[] = {
@@ -31,6 +32,8 @@ static const TargetMapping HSAIL64TargetMapping_0_8[] = {
{ "VI", "Ellesmere", "GFX8", amd::GPU_Library_HSAIL, VI_ELLESMERE_P_A0, F_VI_BASE, true, true, FAMILY_VI },
{ "AI", "gfx900", "GFX9", amd::GPU_Library_HSAIL, AI_GREENLAND_P_A0, F_AI_BASE, true, true, FAMILY_AI },
{ "VI", "gfx804", "GFX8", amd::GPU_Library_HSAIL, VI_LEXA_V_A0, F_VI_BASE, true, true, FAMILY_VI },
UnknownTarget,
InvalidTarget
};
+1
View File
@@ -128,6 +128,7 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* CAL_TARGET_GREENLAND */ { ED_ATI_CAL_MACHINE_GREENLAND_ISA, "gfx900", "gfx900", 4, 16, 1, 256, 64 * Ki, 32, 900 },
/* CAL_TARGET_STONEY */ { ED_ATI_CAL_MACHINE_STONEY_ISA, "Stoney", "stoney", 4, 16, 1, 256, 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, "gfx901", "gfx901", 4, 16, 1, 256, 64 * Ki, 32, 900 },
};
enum gfx_handle {
+1
View File
@@ -155,6 +155,7 @@ NullDevice::create(CALtarget target)
case CAL_TARGET_GREENLAND:
case CAL_TARGET_STONEY:
case CAL_TARGET_LEXA:
case CAL_TARGET_RAVEN:
calAttr.doublePrecision = CAL_TRUE;
calAttr.isOpenCL200Device = CAL_TRUE;
break;
@@ -167,6 +167,9 @@ Settings::create(
ModifyMaxWorkload modifyMaxWorkload = {0};
switch (target) {
case CAL_TARGET_RAVEN:
// APU systems for AI
apuSystem_ = true;
case CAL_TARGET_GREENLAND:
//TODO: specific codes for AI
aiPlus_ = true;
@@ -505,6 +505,10 @@ CALGSLDevice::SetupContext(int32 &asic_id)
m_target = CAL_TARGET_LEXA;
m_elfmachine = ED_ATI_CAL_MACHINE_LEXA_ISA;
break;
case GSL_ATIASIC_ID_RAVEN:
m_target = CAL_TARGET_RAVEN;
m_elfmachine = ED_ATI_CAL_MACHINE_RAVEN_ISA;
break;
default:
// 6XX is not supported
m_adp->deleteContext(temp_cs);
@@ -46,7 +46,8 @@ typedef enum CALtargetEnum {
CAL_TARGET_GREENLAND, /**< GREENLAND GPU ISA*/
CAL_TARGET_STONEY, /**< STONEY GPU ISA*/
CAL_TARGET_LEXA, /**< LEXA GPU ISA*/
CAL_TARGET_LAST = CAL_TARGET_LEXA, /**< last */
CAL_TARGET_RAVEN, /**< RAVEN GPU ISA*/
CAL_TARGET_LAST = CAL_TARGET_RAVEN, /**< last */
//##END_PRIVATE##
} CALtarget;
+3
View File
@@ -156,6 +156,9 @@ static const AMDDeviceInfo GfxIpDeviceInfo[] = {
/* GFX900 */ { "gfx900", "gfx900", 4, 16, 1, 256, 64 * Ki, 32, 900 },
};
static const AMDDeviceInfo Gfx901DeviceInfo =
/* GFX901 */ { "gfx901", "gfx901", 4, 16, 1, 256, 64 * Ki, 32, 901 };
enum gfx_handle {
gfx700 = 700,
gfx701 = 701,
+6 -1
View File
@@ -700,7 +700,12 @@ Device::create(Pal::IDevice* device)
hwInfo_ = &DeviceInfo[static_cast<uint>(properties().revision)];
}
else if (ipLevel_ >= Pal::GfxIpLevel::GfxIp9) {
hwInfo_ = &GfxIpDeviceInfo[static_cast<uint>(ipLevel_)];
if (properties().gpuType == Pal::GpuType::Integrated) {
hwInfo_ = &Gfx901DeviceInfo;
}
else {
hwInfo_ = &GfxIpDeviceInfo[static_cast<uint>(ipLevel_)];
}
}
else {
return false;
+5 -4
View File
@@ -163,6 +163,11 @@ Settings::create(
// Update GPU specific settings and info structure if we have any
ModifyMaxWorkload modifyMaxWorkload = {0};
// APU systems
if (palProp.gpuType == Pal::GpuType::Integrated) {
apuSystem_ = true;
}
switch (palProp.revision) {
case Pal::AsicRevision::Unknown:
switch (palProp.gfxLevel) {
@@ -177,8 +182,6 @@ Settings::create(
case Pal::AsicRevision::Carrizo:
case Pal::AsicRevision::Stoney:
if (!aiPlus_) {
// APU systems for VI
apuSystem_ = true;
// Fix BSOD/TDR issues observed on Stoney Win7/8.1/10
minWorkloadTime_ = 1000;
modifyMaxWorkload.time = 1000; // Decided by experiment
@@ -204,8 +207,6 @@ Settings::create(
case Pal::AsicRevision::Kalindi:
case Pal::AsicRevision::Spectre:
if (!viPlus_) {
// APU systems for CI
apuSystem_ = true;
// Fix BSOD/TDR issues observed on Kaveri Win7 (EPR#416903)
modifyMaxWorkload.time = 250000; // 250ms
modifyMaxWorkload.minorVersion = 1; // Win 7