From d53616dbf29c0590a81d049f057eb6cbbc7bb0f2 Mon Sep 17 00:00:00 2001
From: foreman
Date: Thu, 19 Feb 2015 09:46:45 -0500
Subject: [PATCH] P4 to Git Change 1123388 by asalmanp@asalmanp-opencl-stg1 on
2015/02/19 09:39:12
EPR #394115 - [OpenCL] Adding support for Baffin (gfx8) and removing Bermuda IDs as it's canceled for production.
ReviewBoardURL = http://ocltc.amd.com/reviews/r/6906/
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/SI/devStateSI.cpp#18 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/devState.cpp#25 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/gpu/scwrapper/scCompileBase.cpp#41 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABI.h#15 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABIMultiBinary.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#30 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil.h#25 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_amdil64.h#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#21 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#16 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_9/target_mappings.h#25 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_9/target_mappings_amdil.h#24 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_9/target_mappings_amdil64.h#26 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDIL.h#109 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/AMDILSubtarget.cpp#207 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/AMDILInternalDeviceFlags.h#12 edit
... //depot/stg/opencl/drivers/opencl/compiler/llvm/lib/Target/AMDIL/Internal/InternalProcessors.td#21 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#53 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#119 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#495 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#302 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/include/cal/cal.h#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#107 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIFEnumCheck.cpp#21 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/math/OCLMathFunc.cpp#19 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLDeviceQueries.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLPerfCounters.cpp#21 edit
[ROCm/clr commit: 861ef524fb50603512d1172b7f8271e92090423c]
---
.../clr/rocclr/compiler/lib/utils/v0_8/target_mappings.h | 4 ++--
projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp | 2 +-
projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp | 2 +-
projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp | 2 +-
.../rocclr/runtime/device/gpu/gslbe/src/include/cal/cal.h | 4 ++--
.../clr/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp | 5 +++++
6 files changed, 12 insertions(+), 7 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 7cb4c084a3..1fd2ab2dc7 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
@@ -191,8 +191,8 @@ static const char* calTargetMapping[] = {
"Oland", "Bonaire",
"Spectre", "Spooky", "Kalindi",
"Hainan", "Hawaii",
- "Iceland", "Tonga", "Mullins", "", "Fiji",
- "Carrizo", "",
+ "Iceland", "Tonga", "Mullins", "Fiji",
+ "Carrizo", "", "",
};
#include "utils/v0_8/target_mappings_amdil.h"
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp b/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
index 73a38c4da3..83646246a9 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpudefs.hpp
@@ -121,10 +121,10 @@ static const AMDDeviceInfo DeviceInfo[] = {
/* CAL_TARGET_ICELAND */ { ED_ATI_CAL_MACHINE_ICELAND_ISA, "Iceland", "iceland", 4, 16, 1, 256, 64 * Ki, 32, 800 },
/* CAL_TARGET_TONGA */ { ED_ATI_CAL_MACHINE_TONGA_ISA, "Tonga", "tonga", 4, 16, 1, 256, 64 * Ki, 32, 800 },
/* CAL_TARGET_MULLINS */ { ED_ATI_CAL_MACHINE_GODAVARI_ISA, "Mullins", "mullins", 4, 16, 1, 256, 64 * Ki, 32, 702 },
-/* 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, "Fiji", "fiji", 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 },
+/* CAL_TARGET_BAFFIN */ { ED_ATI_CAL_MACHINE_BAFFIN_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 00044873fc..c6a3bcffed 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -153,11 +153,11 @@ NullDevice::create(CALtarget target)
case CAL_TARGET_HAWAII:
case CAL_TARGET_ICELAND:
case CAL_TARGET_TONGA:
- case CAL_TARGET_BERMUDA:
case CAL_TARGET_FIJI:
case CAL_TARGET_GODAVARI:
case CAL_TARGET_CARRIZO:
case CAL_TARGET_ELLESMERE:
+ case CAL_TARGET_BAFFIN:
calAttr.doublePrecision = CAL_TRUE;
calAttr.isOpenCL200Device = CAL_TRUE;
break;
diff --git a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
index a061c66270..50f2fd1447 100644
--- a/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/projects/clr/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -241,9 +241,9 @@ Settings::create(
apuSystem_ = true;
case CAL_TARGET_ICELAND:
case CAL_TARGET_TONGA:
- case CAL_TARGET_BERMUDA:
case CAL_TARGET_FIJI:
case CAL_TARGET_ELLESMERE:
+ case CAL_TARGET_BAFFIN:
// 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 066a188fbc..1e800fae6e 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
@@ -174,11 +174,11 @@ typedef enum CALtargetEnum {
CAL_TARGET_ICELAND, /**< ICELAND GPU ISA*/
CAL_TARGET_TONGA, /**< TONGA GPU ISA*/
CAL_TARGET_GODAVARI, /**< MULLINS GPU ISA*/
- CAL_TARGET_BERMUDA, /**< BERMUDA GPU ISA*/
CAL_TARGET_FIJI, /**< FIJI GPU ISA*/
CAL_TARGET_CARRIZO, /**< CARRIZO GPU ISA*/
CAL_TARGET_ELLESMERE, /**< ELLESMERE GPU ISA*/
- CAL_TARGET_LAST = CAL_TARGET_ELLESMERE, /**< last */
+ CAL_TARGET_BAFFIN, /**< BAFFIN GPU ISA*/
+ CAL_TARGET_LAST = CAL_TARGET_BAFFIN, /**< 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 87c03db48f..22f582c89e 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
@@ -566,6 +566,11 @@ CALGSLDevice::SetupContext(int32 &asic_id)
m_target = CAL_TARGET_ELLESMERE;
m_elfmachine = ED_ATI_CAL_MACHINE_ELLESMERE_ISA;
break;
+ case GSL_ATIASIC_ID_BAFFIN:
+ m_target = CAL_TARGET_BAFFIN;
+ m_elfmachine = ED_ATI_CAL_MACHINE_BAFFIN_ISA;
+ break;
+
default:
// 6XX is not supported
m_adp->deleteContext(temp_cs);