From 4f71027ade9cc91e66294b2795c7ea9337f1bdcb Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 5 Oct 2016 13:47:07 -0400
Subject: [PATCH] P4 to Git Change 1322829 by asalmanp@asalmanp-opencl-stg on
2016/10/05 13:35:20
SWDEV-79278 - Expose Lexa as "gfx804" and Vega10 as "gfx900" in mainline.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/11515/
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings.h#16 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_amdil.h#16 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_amdil64.h#15 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail.h#15 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail64.h#15 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#153 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#48 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil.h#42 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil64.h#38 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#39 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#34 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/AMDILSubtarget.cpp#10 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm32/lib/Target/AMDIL/Internal/InternalProcessors.td#10 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#64 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#142 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#12 edit
... //depot/stg/opencl/drivers/opencl/tests/hsa/bin/test_driver.pl#35 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/math/OCLMathFunc.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp#41 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLOfflineCompilation.cpp#17 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLPerfCounters.cpp#34 edit
[ROCm/clr commit: 926e59ce0b7d4d6768c4c783199e8a683131fbf2]
---
.../rocclr/compiler/lib/backends/common/linker.cpp | 2 +-
.../rocclr/compiler/lib/utils/v0_8/target_mappings.h | 3 +--
.../compiler/lib/utils/v0_8/target_mappings_amdil.h | 2 +-
.../lib/utils/v0_8/target_mappings_amdil64.h | 2 +-
.../compiler/lib/utils/v0_8/target_mappings_hsail.h | 4 ++--
.../lib/utils/v0_8/target_mappings_hsail64.h | 4 ++--
projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp | 4 ++--
projects/clr/rocclr/runtime/device/pal/paldefs.hpp | 12 ++++++------
8 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/projects/clr/rocclr/compiler/lib/backends/common/linker.cpp b/projects/clr/rocclr/compiler/lib/backends/common/linker.cpp
index 1a58d41cb4..e2b33830b3 100644
--- a/projects/clr/rocclr/compiler/lib/backends/common/linker.cpp
+++ b/projects/clr/rocclr/compiler/lib/backends/common/linker.cpp
@@ -582,7 +582,7 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vectorgetContext().setAMDLLVMContextHook(&hookup_);
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 e10ddea3bd..a7be39f755 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
@@ -206,8 +206,7 @@ static const char* calTargetMapping[] = {
"Hainan", "Hawaii",
"Iceland", "Tonga", "Mullins", "Fiji",
"Carrizo", "Ellesmere", "Baffin",
- "Rabbit", "Stoney",
- "Bee",
+ "gfx900", "Stoney", "gfx804",
};
#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 5da220c1a5..d97037c89e 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
@@ -87,7 +87,6 @@ static const TargetMapping AMDILTargetMapping_0_8[] = {
UnknownTarget,
UnknownTarget,
- { "VI", "Bee", "bee", amd::GPU_Library_CI, VI_LEXA_V_A0, F_SI_BASE, true, true, FAMILY_VI },
{ "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, false, false, FAMILY_TN },
{ "TN", "Devastator", "trinity", amd::GPU_Library_Evergreen, TN_DEVASTATOR_W_A1, F_NI_EXT, false, false, FAMILY_TN },
@@ -101,6 +100,7 @@ static const TargetMapping AMDILTargetMapping_0_8[] = {
{ "CZ", "Stoney", "stoney", amd::GPU_Library_CI, STONEY_A0, F_SI_BASE, true, true, FAMILY_CZ },
{ "VI", "Baffin", "baffin", amd::GPU_Library_CI, VI_BAFFIN_M_A0, F_SI_BASE, true, true, FAMILY_VI },
{ "VI", "Ellesmere", "ellesmere", amd::GPU_Library_CI, VI_ELLESMERE_P_A0, F_SI_BASE, true, true, FAMILY_VI },
+ { "VI", "gfx804", "gfx804", amd::GPU_Library_CI, VI_LEXA_V_A0, F_SI_BASE, true, true, FAMILY_VI },
InvalidTarget
};
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 7301ce192d..ad354b868e 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
@@ -38,7 +38,6 @@ static const TargetMapping AMDIL64TargetMapping_0_8[] = {
UnknownTarget,
UnknownTarget,
- { "VI", "Bee", "bee", amd::GPU64_Library_CI, VI_LEXA_V_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
{ "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 },
@@ -47,6 +46,7 @@ static const TargetMapping AMDIL64TargetMapping_0_8[] = {
{ "CZ", "Stoney", "stoney", amd::GPU64_Library_CI, STONEY_A0, F_SI_64BIT_PTR, true, true, FAMILY_CZ },
{ "VI", "Baffin", "baffin", amd::GPU64_Library_CI, VI_BAFFIN_M_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
{ "VI", "Ellesmere", "ellesmere", amd::GPU64_Library_CI, VI_ELLESMERE_P_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
+ { "VI", "gfx804", "gfx804", amd::GPU64_Library_CI, VI_LEXA_V_A0, F_SI_64BIT_PTR, true, true, FAMILY_VI },
InvalidTarget
};
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 053c6e0162..47fa56fcaf 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
@@ -25,13 +25,13 @@ static const TargetMapping HSAILTargetMapping_0_8[] = {
UnknownTarget,
UnknownTarget,
- { "AI", "Rabbit", "GFX9", amd::GPU_Library_HSAIL, AI_GREENLAND_P_A0, F_AI_BASE, true, true, FAMILY_AI },
- { "VI", "Bee", "GFX8", amd::GPU_Library_HSAIL, VI_LEXA_V_A0, F_VI_BASE, true, true, FAMILY_VI },
{ "CZ", "Carrizo", "GFX8", amd::GPU_Library_HSAIL, CARRIZO_A0, F_VI_BASE, true, true, FAMILY_CZ },
{ "VI", "Fiji", "GFX8", amd::GPU_Library_HSAIL, VI_FIJI_P_A0, F_VI_BASE, true, true, FAMILY_VI },
{ "CZ", "Stoney", "GFX8", amd::GPU_Library_HSAIL, STONEY_A0, F_VI_BASE, true, true, FAMILY_CZ },
{ "VI", "Baffin", "GFX8", amd::GPU_Library_HSAIL, VI_BAFFIN_M_A0, F_VI_BASE, true, true, FAMILY_VI },
{ "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 },
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 ed39eccab8..f2ab80d60b 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
@@ -24,13 +24,13 @@ static const TargetMapping HSAIL64TargetMapping_0_8[] = {
UnknownTarget,
UnknownTarget,
- { "AI", "Rabbit", "GFX9", amd::GPU_Library_HSAIL, AI_GREENLAND_P_A0, F_AI_BASE, true, true, FAMILY_AI },
- { "VI", "Bee", "GFX8", amd::GPU_Library_HSAIL, VI_LEXA_V_A0, F_VI_BASE, true, true, FAMILY_VI },
{ "CZ", "Carrizo", "GFX8", amd::GPU_Library_HSAIL, CARRIZO_A0, F_VI_BASE, true, true, FAMILY_CZ },
{ "VI", "Fiji", "GFX8", amd::GPU_Library_HSAIL, VI_FIJI_P_A0, F_VI_BASE, true, true, FAMILY_VI },
{ "CZ", "Stoney", "GFX8", amd::GPU_Library_HSAIL, STONEY_A0, F_VI_BASE, true, true, FAMILY_CZ },
{ "VI", "Baffin", "GFX8", amd::GPU_Library_HSAIL, VI_BAFFIN_M_A0, F_VI_BASE, true, true, FAMILY_VI },
{ "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 },
InvalidTarget
};
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp b/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
index 037afc8a7c..ab964c2730 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
@@ -125,9 +125,9 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* 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, "Ellesmere", "ellesmere", 4, 16, 1, 256, 64 * Ki, 32, 800 },
/* CAL_TARGET_BAFFIN */ { ED_ATI_CAL_MACHINE_BAFFIN_ISA, "Baffin", "baffin", 4, 16, 1, 256, 64 * Ki, 32, 800 },
-/* CAL_TARGET_GREENLAND */ { ED_ATI_CAL_MACHINE_GREENLAND_ISA, "Rabbit", "rabbit", 4, 16, 1, 256, 64 * Ki, 32, 900 },
+/* 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, "Bee", "bee", 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, 804 },
};
enum gfx_handle {
diff --git a/projects/clr/rocclr/runtime/device/pal/paldefs.hpp b/projects/clr/rocclr/runtime/device/pal/paldefs.hpp
index 25c5a0768d..39f9694f22 100644
--- a/projects/clr/rocclr/runtime/device/pal/paldefs.hpp
+++ b/projects/clr/rocclr/runtime/device/pal/paldefs.hpp
@@ -148,12 +148,12 @@ static const AMDDeviceInfo DeviceInfo[] = {
// The GfxIpDeviceInfo table must match with GfxIpLevel enum
// (located in //depot/stg/pal/inc/core/palDevice.h).
static const AMDDeviceInfo GfxIpDeviceInfo[] = {
-/* Unknown */ { "", "unknown", 4, 16, 1, 256, 64 * Ki, 32, 000 },
-/* GFX6_0_0 */ { "", "gfx6_0_0", 4, 16, 1, 256, 64 * Ki, 32, 600 },
-/* GFX7_0_0 */ { "", "gfx7_0_0", 4, 16, 1, 256, 64 * Ki, 32, 700 },
-/* GFX8_0_0 */ { "", "gfx8_0_0", 4, 16, 1, 256, 64 * Ki, 32, 800 },
-/* GFX8_0_1 */ { "", "gfx8_0_1", 4, 16, 1, 256, 64 * Ki, 32, 801 },
-/* GFX9_0_0 */ { "Rabbit", "rabbit", 4, 16, 1, 256, 64 * Ki, 32, 900 },
+/* Unknown */ { "unknown", "unknown", 4, 16, 1, 256, 64 * Ki, 32, 000 },
+/* GFX600 */ { "gfx600", "gfx600", 4, 16, 1, 256, 64 * Ki, 32, 600 },
+/* GFX700 */ { "gfx700", "gfx700", 4, 16, 1, 256, 64 * Ki, 32, 700 },
+/* GFX800 */ { "gfx800", "gfx800", 4, 16, 1, 256, 64 * Ki, 32, 800 },
+/* GFX801 */ { "gfx801", "gfx801", 4, 16, 1, 256, 64 * Ki, 32, 801 },
+/* GFX900 */ { "gfx900", "gfx900", 4, 16, 1, 256, 64 * Ki, 32, 900 },
};
enum gfx_handle {