P4 to Git Change 1450441 by asalmanp@asalmanp-ocl-stg on 2017/08/22 17:11:11
SWDEV-79278 - adding support for Vega12/Vega20/Navi10
ReviewBoardURL = http://ocltc.amd.com/reviews/r/13326/
Affected files ...
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/libUtils.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings.h#20 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail.h#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail64.h#23 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#156 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABI.h#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABIMultiBinary.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#27 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#52 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#48 edit
... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#43 edit
... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#67 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudefs.hpp#148 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.cpp#568 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#234 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpusettings.cpp#352 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/GSLDevice.cpp#180 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gslbe/src/rt/caltarget.h#6 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldefs.hpp#18 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palprogram.cpp#45 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palsettings.cpp#26 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/binary/BIFEnumCheck.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/tests/ocltst/module/runtime/OCLOfflineCompilation.cpp#19 edit
[ROCm/clr commit: d7247e104a]
This commit is contained in:
@@ -157,6 +157,13 @@ static const AMDDeviceInfo DeviceInfo[] = {
|
||||
IF(IS_BRAHMA, "", "gfx901"), 4, 16, 1, 256, 64 * Ki, 32, 900},
|
||||
/* CAL_TARGET_POLARIS22 */ {ED_ATI_CAL_MACHINE_POLARIS22_ISA, IF(IS_BRAHMA, "", "gfx804"),
|
||||
IF(IS_BRAHMA, "", "gfx804"), 4, 16, 1, 256, 64 * Ki, 32, 800},
|
||||
/* CAL_TARGET_VEGA12 */{ ED_ATI_CAL_MACHINE_VEGA12_ISA, IF(IS_BRAHMA, "", "gfx904"),
|
||||
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, "", "gfx1000"),
|
||||
IF(IS_BRAHMA, "", "gfx1000"), 4, 16, 1, 256, 64 * Ki, 32, 1000 },
|
||||
|
||||
};
|
||||
|
||||
enum gfx_handle {
|
||||
@@ -168,7 +175,15 @@ enum gfx_handle {
|
||||
gfx804 = 804,
|
||||
gfx810 = 810,
|
||||
gfx900 = 900,
|
||||
gfx901 = 901
|
||||
gfx901 = 901,
|
||||
gfx902 = 902,
|
||||
gfx903 = 903,
|
||||
gfx904 = 904,
|
||||
gfx905 = 905,
|
||||
gfx906 = 906,
|
||||
gfx907 = 907,
|
||||
gfx1000 = 1000,
|
||||
gfx1001 = 1001
|
||||
};
|
||||
|
||||
static const char* Gfx700 = "AMD:AMDGPU:7:0:0";
|
||||
@@ -179,6 +194,14 @@ static const char* Gfx804 = "AMD:AMDGPU:8:0:4";
|
||||
static const char* Gfx810 = "AMD:AMDGPU:8:1:0";
|
||||
static const char* Gfx900 = "AMD:AMDGPU:9:0:0";
|
||||
static const char* Gfx901 = "AMD:AMDGPU:9:0:1";
|
||||
static const char* Gfx902 = "AMD:AMDGPU:9:0:2";
|
||||
static const char* Gfx903 = "AMD:AMDGPU:9:0:3";
|
||||
static const char* Gfx904 = "AMD:AMDGPU:9:0:4";
|
||||
static const char* Gfx905 = "AMD:AMDGPU:9:0:5";
|
||||
static const char* Gfx906 = "AMD:AMDGPU:9:0:6";
|
||||
static const char* Gfx907 = "AMD:AMDGPU:9:0:7";
|
||||
static const char* Gfx1000 = "AMD:AMDGPU:10:0:0";
|
||||
static const char* Gfx1001 = "AMD:AMDGPU:10:0:1";
|
||||
|
||||
// Supported OpenCL versions
|
||||
enum OclVersion { OpenCL10, OpenCL11, OpenCL12, OpenCL20 };
|
||||
|
||||
@@ -142,6 +142,9 @@ bool NullDevice::create(CALtarget target) {
|
||||
case CAL_TARGET_LEXA:
|
||||
case CAL_TARGET_RAVEN:
|
||||
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;
|
||||
@@ -812,7 +815,8 @@ bool Device::create(CALuint ordinal, CALuint numOfDevices) {
|
||||
hwInfo_ = &DeviceInfo[calTarget_];
|
||||
|
||||
if ((GPU_ENABLE_PAL == 2) &&
|
||||
(calTarget_ == CAL_TARGET_GREENLAND || calTarget_ == CAL_TARGET_RAVEN)) {
|
||||
(calTarget_ == CAL_TARGET_GREENLAND || calTarget_ == CAL_TARGET_RAVEN ||
|
||||
calTarget_ >= CAL_TARGET_VEGA12)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -2227,6 +2227,39 @@ hsa_isa_t ORCAHSALoaderContext::IsaFromName(const char* name) {
|
||||
isa.handle = gfx901;
|
||||
return isa;
|
||||
}
|
||||
if (!strcmp(Gfx902, name)) {
|
||||
isa.handle = gfx902;
|
||||
return isa;
|
||||
}
|
||||
if (!strcmp(Gfx903, name)) {
|
||||
isa.handle = gfx903;
|
||||
return isa;
|
||||
}
|
||||
if (!strcmp(Gfx904, name)) {
|
||||
isa.handle = gfx904;
|
||||
return isa;
|
||||
}
|
||||
if (!strcmp(Gfx905, name)) {
|
||||
isa.handle = gfx905;
|
||||
return isa;
|
||||
}
|
||||
if (!strcmp(Gfx906, name)) {
|
||||
isa.handle = gfx906;
|
||||
return isa;
|
||||
}
|
||||
if (!strcmp(Gfx907, name)) {
|
||||
isa.handle = gfx907;
|
||||
return isa;
|
||||
}
|
||||
if (!strcmp(Gfx1000, name)) {
|
||||
isa.handle = gfx1000;
|
||||
return isa;
|
||||
}
|
||||
if (!strcmp(Gfx1001, name)) {
|
||||
isa.handle = gfx1001;
|
||||
return isa;
|
||||
}
|
||||
|
||||
return isa;
|
||||
}
|
||||
|
||||
@@ -2262,13 +2295,35 @@ bool ORCAHSALoaderContext::IsaSupportedByAgent(hsa_agent_t agent, hsa_isa_t isa)
|
||||
return false;
|
||||
}
|
||||
case gfx900:
|
||||
case gfx901:
|
||||
case gfx902:
|
||||
case gfx903:
|
||||
case gfx904:
|
||||
case gfx905:
|
||||
case gfx906:
|
||||
case gfx907:
|
||||
switch (program_->dev().hwInfo()->machine_) {
|
||||
case ED_ATI_CAL_MACHINE_GREENLAND_ISA:
|
||||
return isa.handle == gfx900 || isa.handle == gfx901;
|
||||
case ED_ATI_CAL_MACHINE_RAVEN_ISA:
|
||||
return isa.handle == gfx902 || isa.handle == gfx903;
|
||||
case ED_ATI_CAL_MACHINE_VEGA12_ISA:
|
||||
return isa.handle == gfx904 || isa.handle == gfx905;
|
||||
case ED_ATI_CAL_MACHINE_VEGA20_ISA:
|
||||
return isa.handle == gfx906 || isa.handle == gfx907;
|
||||
default:
|
||||
assert(0);
|
||||
return false;
|
||||
}
|
||||
case gfx1000:
|
||||
case gfx1001:
|
||||
switch (program_->dev().hwInfo()->machine_) {
|
||||
case ED_ATI_CAL_MACHINE_NAVI10_ISA:
|
||||
return isa.handle == gfx1000 || isa.handle == gfx1001;
|
||||
default:
|
||||
assert(0);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -164,6 +164,9 @@ bool Settings::create(const CALdeviceattribs& calAttr, bool reportAsOCL12Device,
|
||||
// APU systems for AI
|
||||
apuSystem_ = true;
|
||||
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 ...
|
||||
|
||||
@@ -513,6 +513,19 @@ CALGSLDevice::SetupContext(int32 &asic_id)
|
||||
m_target = CAL_TARGET_POLARIS22;
|
||||
m_elfmachine = ED_ATI_CAL_MACHINE_POLARIS22_ISA;
|
||||
break;
|
||||
case GSL_ATIASIC_ID_VEGA12:
|
||||
m_target = CAL_TARGET_VEGA12;
|
||||
m_elfmachine = ED_ATI_CAL_MACHINE_VEGA12_ISA;
|
||||
break;
|
||||
case GSL_ATIASIC_ID_VEGA20:
|
||||
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;
|
||||
|
||||
default:
|
||||
// 6XX is not supported
|
||||
m_adp->deleteContext(temp_cs);
|
||||
|
||||
@@ -48,7 +48,10 @@ typedef enum CALtargetEnum {
|
||||
CAL_TARGET_LEXA, /**< LEXA GPU ISA*/
|
||||
CAL_TARGET_RAVEN, /**< RAVEN GPU ISA*/
|
||||
CAL_TARGET_POLARIS22, /**< POLARIS22 GPU ISA*/
|
||||
CAL_TARGET_LAST = CAL_TARGET_POLARIS22, /**< last */
|
||||
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 */
|
||||
//##END_PRIVATE##
|
||||
} CALtarget;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user