From 1c247a05f79c980be2b7dd86346067a74e9aa6c4 Mon Sep 17 00:00:00 2001
From: foreman
Date: Fri, 22 Feb 2019 15:05:20 -0500
Subject: [PATCH] P4 to Git Change 1747574 by asalmanp@asalmanp-ocl-stg on
2019/02/22 14:37:28
SWDEV-132899 - disable gfx10+ in gsl
Removing Navi10 and disable gfx10+ ASICs from gsl
ReviewRequestURL = http://ocltc.amd.com/reviews/r/16777/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#156 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#604 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#247 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#362 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#190 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/caltarget.h#8 edit
---
rocclr/runtime/device/gpu/gpudefs.hpp | 7 +------
rocclr/runtime/device/gpu/gpudevice.cpp | 1 -
rocclr/runtime/device/gpu/gpuprogram.cpp | 12 ------------
rocclr/runtime/device/gpu/gpusettings.cpp | 1 -
.../device/gpu/gslbe/src/rt/GSLDevice.cpp | 19 ++++++-------------
.../device/gpu/gslbe/src/rt/caltarget.h | 3 +--
6 files changed, 8 insertions(+), 35 deletions(-)
diff --git a/rocclr/runtime/device/gpu/gpudefs.hpp b/rocclr/runtime/device/gpu/gpudefs.hpp
index 056857db4f..f263649cf9 100644
--- a/rocclr/runtime/device/gpu/gpudefs.hpp
+++ b/rocclr/runtime/device/gpu/gpudefs.hpp
@@ -163,9 +163,6 @@ static const AMDDeviceInfo DeviceInfo[] = {
IF(IS_BRAHMA, "", "gfx904"), 4, 16, 1, 256, 64 * Ki, 32, 900 },
/* CAL_TARGET_VEGA20 */{ ED_ATI_CAL_MACHINE_VEGA20_ISA, IF(IS_BRAHMA, "", "gfx906"),
IF(IS_BRAHMA, "", "gfx906"), 4, 16, 1, 256, 64 * Ki, 32, 900 },
- /* CAL_TARGET_NAVI10 */{ ED_ATI_CAL_MACHINE_NAVI10_ISA, IF(IS_BRAHMA, "", "gfx1010"),
- IF(IS_BRAHMA, "", "gfx1010"), 4, 16, 1, 256, 64 * Ki, 32, 1010 },
-
};
enum gfx_handle {
@@ -183,8 +180,7 @@ enum gfx_handle {
gfx904 = 904,
gfx905 = 905,
gfx906 = 906,
- gfx907 = 907,
- gfx1010 = 1010
+ gfx907 = 907
};
static const char* Gfx700 = "amdgcn-amd-amdhsa--gfx700";
@@ -201,7 +197,6 @@ static const char* Gfx904 = "amdgcn-amd-amdhsa--gfx904";
static const char* Gfx905 = "amdgcn-amd-amdhsa--gfx905";
static const char* Gfx906 = "amdgcn-amd-amdhsa--gfx906";
static const char* Gfx907 = "amdgcn-amd-amdhsa--gfx907";
-static const char* Gfx1010 = "amdgcn-amd-amdhsa--gfx1010";
// Supported OpenCL versions
enum OclVersion { OpenCL10, OpenCL11, OpenCL12, OpenCL20, OpenCL21 };
diff --git a/rocclr/runtime/device/gpu/gpudevice.cpp b/rocclr/runtime/device/gpu/gpudevice.cpp
index aa8ed5147d..6371399403 100644
--- a/rocclr/runtime/device/gpu/gpudevice.cpp
+++ b/rocclr/runtime/device/gpu/gpudevice.cpp
@@ -168,7 +168,6 @@ bool NullDevice::create(CALtarget target) {
case CAL_TARGET_POLARIS22:
case CAL_TARGET_VEGA12:
case CAL_TARGET_VEGA20:
- case CAL_TARGET_NAVI10:
calAttr.doublePrecision = CAL_TRUE;
calAttr.isOpenCL200Device = CAL_TRUE;
break;
diff --git a/rocclr/runtime/device/gpu/gpuprogram.cpp b/rocclr/runtime/device/gpu/gpuprogram.cpp
index 30e7c105e6..f0c918f66d 100644
--- a/rocclr/runtime/device/gpu/gpuprogram.cpp
+++ b/rocclr/runtime/device/gpu/gpuprogram.cpp
@@ -1835,10 +1835,6 @@ hsa_isa_t ORCAHSALoaderContext::IsaFromName(const char* name) {
isa.handle = gfx907;
return isa;
}
- if (!strcmp(Gfx1010, name)) {
- isa.handle = gfx1010;
- return isa;
- }
return isa;
}
@@ -1895,14 +1891,6 @@ bool ORCAHSALoaderContext::IsaSupportedByAgent(hsa_agent_t agent, hsa_isa_t isa)
assert(0);
return false;
}
- case gfx1010:
- switch (program_->dev().hwInfo()->machine_) {
- case ED_ATI_CAL_MACHINE_NAVI10_ISA:
- return isa.handle == gfx1010;
- default:
- assert(0);
- return false;
- }
}
}
diff --git a/rocclr/runtime/device/gpu/gpusettings.cpp b/rocclr/runtime/device/gpu/gpusettings.cpp
index b512d1eb8d..0eee49f942 100644
--- a/rocclr/runtime/device/gpu/gpusettings.cpp
+++ b/rocclr/runtime/device/gpu/gpusettings.cpp
@@ -161,7 +161,6 @@ bool Settings::create(const CALdeviceattribs& calAttr, bool reportAsOCL12Device,
case CAL_TARGET_GREENLAND:
case CAL_TARGET_VEGA12:
case CAL_TARGET_VEGA20:
- case CAL_TARGET_NAVI10:
// TODO: specific codes for AI
aiPlus_ = true;
// Fall through to VI ...
diff --git a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
index ab5e50cfab..c101dbcdca 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp
@@ -367,6 +367,12 @@ CALGSLDevice::open(uint32 gpuIndex, OpenParams& openData)
int32 asic_id = 0;
if (!SetupAdapter(asic_id))
+ {
+ return false;
+ }
+
+ // Disable gfx10+ ASICs in GSL
+ if (asic_id >= GSL_ATIASIC_ID_NAVI10)
{
return false;
}
@@ -671,19 +677,6 @@ CALGSLDevice::SetupContext(int32 &asic_id)
m_target = CAL_TARGET_VEGA20;
m_elfmachine = ED_ATI_CAL_MACHINE_VEGA20_ISA;
break;
- case GSL_ATIASIC_ID_NAVI10:
- m_target = CAL_TARGET_NAVI10;
- m_elfmachine = ED_ATI_CAL_MACHINE_NAVI10_ISA;
- break;
- case GSL_ATIASIC_ID_NAVI14:
- m_target = CAL_TARGET_NAVI10;
- m_elfmachine = ED_ATI_CAL_MACHINE_NAVI10_ISA;
- break;
- case GSL_ATIASIC_ID_NAVI12:
- m_target = CAL_TARGET_NAVI10;
- m_elfmachine = ED_ATI_CAL_MACHINE_NAVI10_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 0e8a6a0a81..5fcdd44340 100644
--- a/rocclr/runtime/device/gpu/gslbe/src/rt/caltarget.h
+++ b/rocclr/runtime/device/gpu/gslbe/src/rt/caltarget.h
@@ -51,8 +51,7 @@ typedef enum CALtargetEnum {
CAL_TARGET_POLARIS22, /**< POLARIS22 GPU ISA*/
CAL_TARGET_VEGA12, /**< VEGA12 GPU ISA*/
CAL_TARGET_VEGA20, /**< VEGA20 GPU ISA*/
- CAL_TARGET_NAVI10, /**< NAVI10 GPU ISA*/
- CAL_TARGET_LAST = CAL_TARGET_NAVI10, /**< last */
+ CAL_TARGET_LAST = CAL_TARGET_VEGA20, /**< last */
//##END_PRIVATE##
} CALtarget;