From db05ab434f9344ead0424ddcb140a5eaab333e0d Mon Sep 17 00:00:00 2001
From: foreman
Date: Mon, 24 Nov 2014 09:53:40 -0500
Subject: [PATCH] P4 to Git Change 1099819 by asalmanp@asalmanp-opencl-stg1 on
2014/11/24 09:47:35
EPR #394115 - [OpenCL][AI BU] - Adding support for Ellesmere (gfx8)
ReviewBoardURL = http://ocltc.amd.com/reviews/r/6350/
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/SI/devStateSI.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/devState.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/scCompileBase.cpp#39 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABI.h#14 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABIMultiBinary.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#28 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil.h#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil64.h#20 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#19 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#14 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_9/target_mappings.h#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_9/target_mappings_amdil.h#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_9/target_mappings_amdil64.h#24 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDIL.h#107 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSubtarget.cpp#205 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/AMDILInternalDeviceFlags.h#11 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/InternalProcessors.td#19 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#51 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#117 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#484 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#294 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/include/cal/cal.h#30 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#102 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIFEnumCheck.cpp#20 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/complib/CLTargetInfo.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/math/OCLMathFunc.cpp#18 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLOfflineCompilation.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLPerfCounters.cpp#20 edit
[ROCm/clr commit: 06d3b47141032fb35eca579cffd2e9051ff66723]
---
.../clr/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 +
projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp | 1 +
projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp | 1 +
projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp | 1 +
.../rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h | 3 ++-
.../clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 5 +++++
10 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h
index d7dc67794b..8f3f5f1e97 100644
--- a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h
+++ b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h
@@ -192,7 +192,7 @@ static const char* calTargetMapping[] = {
"Spectre", "Spooky", "Kalindi",
"Hainan", "Hawaii",
"Iceland", "Tonga", "Mullins", "", "Hoatzin",
- "Carrizo",
+ "Carrizo", "",
};
#include "utils/v0_8/target_mappings_amdil.h"
diff --git a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h
index eff56c3cc5..394adc8a7b 100644
--- a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h
+++ b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil.h
@@ -88,6 +88,7 @@ static const TargetMapping AMDILTargetMapping_0_8[] = {
UnknownTarget,
UnknownTarget,
{ "VI", "Hoatzin", "hoatzin", amd::GPU_Library_CI, VI_FIJI_P_A0, F_SI_BASE, true, true, FAMILY_VI },
+ UnknownTarget,
{ "CZ", "Carrizo", "carrizo", amd::GPU_Library_CI, CARRIZO_A0, F_SI_BASE, true, true, FAMILY_CZ },
{ "TN", "Devastator", "trinity", amd::GPU_Library_Evergreen, TN_DEVASTATOR_W_A0, F_NI_EXT, true, false, FAMILY_TN },
{ "TN", "Devastator", "trinity", amd::GPU_Library_Evergreen, TN_DEVASTATOR_W_A1, F_NI_EXT, true, false, FAMILY_TN },
diff --git a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h
index 34909f834f..ecee63167c 100644
--- a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h
+++ b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_amdil64.h
@@ -40,6 +40,7 @@ static const TargetMapping AMDIL64TargetMapping_0_8[] = {
UnknownTarget,
UnknownTarget,
{ "VI", "Hoatzin", "hoatzin", amd::GPU64_Library_CI, VI_FIJI_P_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
+ UnknownTarget,
{ "CZ", "Carrizo", "carrizo", amd::GPU64_Library_CI, CARRIZO_A0, F_SI_64BIT_PTR, true, true, FAMILY_CZ },
{ "VI", "Iceland", "iceland", amd::GPU64_Library_CI, VI_ICELAND_M_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
{ "VI", "Tonga", "tonga", amd::GPU64_Library_CI, VI_TONGA_P_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
diff --git a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h
index a7bc027339..163710e2bd 100644
--- a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h
+++ b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h
@@ -26,6 +26,7 @@ static const TargetMapping HSAILTargetMapping_0_8[] = {
UnknownTarget,
UnknownTarget,
{ "VI", "Hoatzin", "generic", amd::GPU_Library_HSAIL, VI_FIJI_P_A0, 0, true, true, FAMILY_VI },
+ UnknownTarget,
{ "CZ", "Carrizo", "generic", amd::GPU_Library_HSAIL, CARRIZO_A0, 0, true, true, FAMILY_CZ },
InvalidTarget
};
diff --git a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h
index 07be43e03d..ece3899cbf 100644
--- a/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h
+++ b/projects/clr/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h
@@ -25,6 +25,7 @@ static const TargetMapping HSAIL64TargetMapping_0_8[] = {
UnknownTarget,
UnknownTarget,
{ "VI", "Hoatzin", "generic", amd::GPU_Library_HSAIL, VI_FIJI_P_A0, 0, true, true, FAMILY_VI },
+ UnknownTarget,
{ "CZ", "Carrizo", "generic", amd::GPU_Library_HSAIL, CARRIZO_A0, 0, true, true, FAMILY_CZ },
InvalidTarget
};
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp b/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
index 54a64017f3..1bc9a3a9c8 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
@@ -124,6 +124,7 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* CAL_TARGET_BERMUDA */ { ED_ATI_CAL_MACHINE_BERMUDA_ISA, "", "", 4, 16, 1, 256, 64 * Ki, 32, 800 },
/* CAL_TARGET_FIJI */ { ED_ATI_CAL_MACHINE_FIJI_ISA, "Hoatzin", "hoatzin", 4, 16, 1, 256, 64 * Ki, 32, 800 },
/* CAL_TARGET_CARRIZO */ { ED_ATI_CAL_MACHINE_CARRIZO_ISA, "Carrizo" , "carrizo", 4, 16, 1, 256, 64 * Ki, 32, 800 },
+/* CAL_TARGET_ELLESMERE */ { ED_ATI_CAL_MACHINE_ELLESMERE_ISA, "", "", 4, 16, 1, 256, 64 * Ki, 32, 800 },
};
// Supported OpenCL versions
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
index 4fcf5b4f22..02c046b5ad 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -153,6 +153,7 @@ NullDevice::create(CALtarget target)
case CAL_TARGET_FIJI:
case CAL_TARGET_GODAVARI:
case CAL_TARGET_CARRIZO:
+ case CAL_TARGET_ELLESMERE:
calAttr.doublePrecision = CAL_TRUE;
break;
default:
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
index 2641c80e59..813f9ddc4d 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -250,6 +250,7 @@ Settings::create(
case CAL_TARGET_TONGA:
case CAL_TARGET_BERMUDA:
case CAL_TARGET_FIJI:
+ case CAL_TARGET_ELLESMERE:
// Disable tiling aperture on VI+
linearPersistentImage_ = true;
viPlus_ = true;
diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h
index a9b8b14608..b4f5d59d88 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h
+++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h
@@ -177,7 +177,8 @@ typedef enum CALtargetEnum {
CAL_TARGET_BERMUDA, /**< BERMUDA GPU ISA*/
CAL_TARGET_FIJI, /**< FIJI GPU ISA*/
CAL_TARGET_CARRIZO, /**< CARRIZO GPU ISA*/
- CAL_TARGET_LAST = CAL_TARGET_CARRIZO, /**< last */
+ CAL_TARGET_ELLESMERE, /**< ELLESMERE GPU ISA*/
+ CAL_TARGET_LAST = CAL_TARGET_ELLESMERE, /**< last */
//##END_PRIVATE##
} CALtarget;
diff --git a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
index e9eab09072..45c6d0bdb4 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
@@ -427,6 +427,7 @@ CALGSLDevice::SetupAdapter(int32 &asic_id)
case GSL_ATIASIC_ID_BERMUDA_P:
case GSL_ATIASIC_ID_FIJI_P:
case GSL_ATIASIC_ID_CARRIZO:
+ case GSL_ATIASIC_ID_ELLESMERE_P:
m_computeRing = true;
break;
default:
@@ -575,6 +576,10 @@ CALGSLDevice::SetupContext(int32 &asic_id)
m_target = CAL_TARGET_CARRIZO;
m_elfmachine = ED_ATI_CAL_MACHINE_CARRIZO_ISA;
break;
+ case GSL_ATIASIC_ID_ELLESMERE_P:
+ m_target = CAL_TARGET_ELLESMERE;
+ m_elfmachine = ED_ATI_CAL_MACHINE_ELLESMERE_ISA;
+ break;
default:
// 6XX is not supported
m_adp->deleteContext(temp_cs);