From ae1fa5ae2fd03edb7c32e940dd00f1d0dfb4c540 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 14 Aug 2015 23:09:39 -0400
Subject: [PATCH] P4 to Git Change 1180763 by todli@todli-win-opencl-kv1 on
2015/08/14 22:54:27
EPR #399601 - OpenCL Stoney BU changes
Reviewed by: Jeff, Brian, Saleel
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/devState.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABI.h#17 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABIMultiBinary.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#32 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil.h#27 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil64.h#24 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#18 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/AMDIL.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/AMDILSubtarget.cpp#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/Internal/AMDILInternalDeviceFlags.h#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/Internal/InternalProcessors.td#4 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#55 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#124 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#518 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#323 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#134 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/caltarget.h#2 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIFEnumCheck.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/math/OCLMathFunc.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLPerfCounters.cpp#23 edit
---
rocclr/compiler/lib/utils/v0_8/target_mappings.h | 2 +-
rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h | 1 +
rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h | 1 +
rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h | 1 +
rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h | 1 +
rocclr/runtime/device/gpu/gpudefs.hpp | 1 +
rocclr/runtime/device/gpu/gpudevice.cpp | 1 +
rocclr/runtime/device/gpu/gpusettings.cpp | 1 +
rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 4 ++++
rocclr/runtime/device/gpu/gslbe/src/rt/caltarget.h | 3 ++-
10 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/rocclr/compiler/lib/utils/v0_8/target_mappings.h b/rocclr/compiler/lib/utils/v0_8/target_mappings.h
index c47017a598..0976ecb8b7 100644
--- a/rocclr/compiler/lib/utils/v0_8/target_mappings.h
+++ b/rocclr/compiler/lib/utils/v0_8/target_mappings.h
@@ -193,7 +193,7 @@ static const char* calTargetMapping[] = {
"Hainan", "Hawaii",
"Iceland", "Tonga", "Mullins", "Fiji",
"Carrizo", "", "",
- "",
+ "", "Stoney",
};
#include "utils/v0_8/target_mappings_amdil.h"
diff --git a/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h b/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h
index 96713293d3..14fdbb0486 100644
--- a/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h
+++ b/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h
@@ -100,6 +100,7 @@ static const TargetMapping AMDILTargetMapping_0_8[] = {
{ "VI", "Tonga", "tonga", amd::GPU_Library_CI, VI_TONGA_P_A0, F_SI_BASE, true, true, FAMILY_VI },
{ "CI", "Bonaire", "bonaire", amd::GPU_Library_CI, CI_BONAIRE_M_A1, F_SI_BASE, true, true, FAMILY_CI },
{ "VI", "Fiji", "fiji", amd::GPU_Library_CI, VI_FIJI_P_A0, F_SI_BASE, true, true, FAMILY_VI },
+ { "CZ", "Stoney", "stoney", amd::GPU_Library_CI, STONEY_A0, F_SI_BASE, true, true, FAMILY_CZ },
InvalidTarget
};
diff --git a/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h b/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h
index 92b4c1573b..da21259d9c 100644
--- a/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h
+++ b/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h
@@ -46,6 +46,7 @@ static const TargetMapping AMDIL64TargetMapping_0_8[] = {
{ "VI", "Tonga", "tonga", amd::GPU64_Library_CI, VI_TONGA_P_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
{ "CI", "Bonaire", "bonaire", amd::GPU64_Library_CI, CI_BONAIRE_M_A0, F_SI_64BIT_PTR, true, true, FAMILY_CI },
{ "VI", "Fiji", "fiji", amd::GPU64_Library_CI, VI_FIJI_P_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
+ { "CZ", "Stoney", "stoney", amd::GPU64_Library_CI, STONEY_A0, F_SI_64BIT_PTR, true, true, FAMILY_CZ },
InvalidTarget
};
diff --git a/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h b/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h
index fb43af630e..1e80ed047a 100644
--- a/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h
+++ b/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h
@@ -30,6 +30,7 @@ static const TargetMapping HSAILTargetMapping_0_8[] = {
UnknownTarget,
{ "CZ", "Carrizo", "generic", amd::GPU_Library_HSAIL, CARRIZO_A0, 0, true, true, FAMILY_CZ },
{ "VI", "Fiji", "generic", amd::GPU_Library_HSAIL, VI_FIJI_P_A0, 0, true, true, FAMILY_VI },
+ { "CZ", "Stoney", "generic", amd::GPU_Library_HSAIL, STONEY_A0, 0, true, true, FAMILY_CZ },
InvalidTarget
};
diff --git a/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h b/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h
index b21ff5a3bd..dd8d5d651e 100644
--- a/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h
+++ b/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h
@@ -29,6 +29,7 @@ static const TargetMapping HSAIL64TargetMapping_0_8[] = {
UnknownTarget,
{ "CZ", "Carrizo", "generic", amd::GPU_Library_HSAIL, CARRIZO_A0, 0, true, true, FAMILY_CZ },
{ "VI", "Fiji", "generic", amd::GPU_Library_HSAIL, VI_FIJI_P_A0, 0, true, true, FAMILY_VI },
+ { "CZ", "Stoney", "generic", amd::GPU_Library_HSAIL, STONEY_A0, 0, true, true, FAMILY_CZ },
InvalidTarget
};
diff --git a/rocclr/runtime/device/gpu/gpudefs.hpp b/rocclr/runtime/device/gpu/gpudefs.hpp
index ad8a73c5c1..758fbf5e01 100644
--- a/rocclr/runtime/device/gpu/gpudefs.hpp
+++ b/rocclr/runtime/device/gpu/gpudefs.hpp
@@ -127,6 +127,7 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* CAL_TARGET_ELLESMERE */ { ED_ATI_CAL_MACHINE_ELLESMERE_ISA, "", "", 4, 16, 1, 256, 64 * Ki, 32, 800 },
/* CAL_TARGET_BAFFIN */ { ED_ATI_CAL_MACHINE_BAFFIN_ISA, "", "", 4, 16, 1, 256, 64 * Ki, 32, 800 },
/* CAL_TARGET_GREENLAND */ { ED_ATI_CAL_MACHINE_GREENLAND_ISA, "", "", 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 },
};
static const char* Gfx700 = "AMD:AMDGPU:7:0:0";
diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp
index d88b3227bd..f36cffbf71 100644
--- a/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -152,6 +152,7 @@ NullDevice::create(CALtarget target)
case CAL_TARGET_ELLESMERE:
case CAL_TARGET_BAFFIN:
case CAL_TARGET_GREENLAND:
+ case CAL_TARGET_STONEY:
calAttr.doublePrecision = CAL_TRUE;
calAttr.isOpenCL200Device = CAL_TRUE;
break;
diff --git a/rocclr/runtime/device/gpu/gpusettings.cpp b/rocclr/runtime/device/gpu/gpusettings.cpp
index 6c59455009..3927ad35df 100644
--- a/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -243,6 +243,7 @@ Settings::create(
aiPlus_ = true;
// Fall through to VI ...
case CAL_TARGET_CARRIZO:
+ case CAL_TARGET_STONEY:
if (!aiPlus_) {
// APU systems for VI
apuSystem_ = true;
diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
index 8b4178a6ab..da835c87dd 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
@@ -533,6 +533,10 @@ CALGSLDevice::SetupContext(int32 &asic_id)
m_target = CAL_TARGET_GREENLAND;
m_elfmachine = ED_ATI_CAL_MACHINE_GREENLAND_ISA;
break;
+ case GSL_ATIASIC_ID_STONEY:
+ m_target = CAL_TARGET_STONEY;
+ m_elfmachine = ED_ATI_CAL_MACHINE_STONEY_ISA;
+ break;
default:
// 6XX is not supported
m_adp->deleteContext(temp_cs);
diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/caltarget.h b/rocclr/runtime/device/gpu/gslbe/src/rt/caltarget.h
index 118e9323ef..e6acd3b1e6 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/caltarget.h
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/caltarget.h
@@ -44,7 +44,8 @@ typedef enum CALtargetEnum {
CAL_TARGET_ELLESMERE, /**< ELLESMERE GPU ISA*/
CAL_TARGET_BAFFIN, /**< BAFFIN GPU ISA*/
CAL_TARGET_GREENLAND, /**< GREENLAND GPU ISA*/
- CAL_TARGET_LAST = CAL_TARGET_GREENLAND, /**< last */
+ CAL_TARGET_STONEY, /**< STONEY GPU ISA*/
+ CAL_TARGET_LAST = CAL_TARGET_STONEY, /**< last */
//##END_PRIVATE##
} CALtarget;