P4 to Git Change 1751553 by asalmanp@asalmanp-ocl-stg on 2019/03/05 11:04:28
SWDEV-132899 - [OCL][GFX10] adding support for Navi12(gfx1011) and Navi14 (gfx1012) reviewboardURL = http://ocltc.amd.com/reviews/r/16839/ Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/libUtils.cpp#12 edit ... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings.h#24 edit ... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail.h#27 edit ... //depot/stg/opencl/drivers/opencl/compiler/legacy-lib/utils/v0_8/target_mappings_hsail64.h#27 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/backends/common/linker.cpp#159 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABI.h#23 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/loaders/bif/amuabi/amuABIMultiBinary.cpp#23 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/libUtils.cpp#37 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings.h#56 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail.h#52 edit ... //depot/stg/opencl/drivers/opencl/compiler/lib/utils/v0_8/target_mappings_hsail64.h#47 edit ... //depot/stg/opencl/drivers/opencl/compiler/tools/driver/driver.cpp#69 edit
This commit is contained in:
@@ -591,7 +591,9 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vector<std::unique_ptr<llvm::Mo
|
||||
|| chip == "gfx906"
|
||||
|| chip == "gfx907"
|
||||
|| chip == "gfx1000"
|
||||
|| chip == "gfx1010");
|
||||
|| chip == "gfx1010"
|
||||
|| chip == "gfx1011"
|
||||
|| chip == "gfx1012");
|
||||
setISAVersion(getIsaType(aclutGetTargetInfo(Elf())));
|
||||
LLVMBinary()->getContext().setAMDLLVMContextHook(&hookup_);
|
||||
|
||||
|
||||
@@ -32,6 +32,8 @@ static const std::string sgfx906 = "AMD:AMDGPU:9:0:6";
|
||||
static const std::string sgfx907 = "AMD:AMDGPU:9:0:7";
|
||||
static const std::string sgfx1000 = "AMD:AMDGPU:10:0:0";
|
||||
static const std::string sgfx1010 = "AMD:AMDGPU:10:1:0";
|
||||
static const std::string sgfx1011 = "AMD:AMDGPU:10:1:1";
|
||||
static const std::string sgfx1012 = "AMD:AMDGPU:10:1:2";
|
||||
|
||||
static const std::string legacyLibName = LINUX_ONLY("lib") "amdocl12cl" LP64_SWITCH(LINUX_SWITCH("32", ""), "64") LINUX_SWITCH(".so", ".dll");
|
||||
|
||||
@@ -547,6 +549,8 @@ const std::string &getIsaTypeName(const aclTargetInfo *target)
|
||||
case 907: return sgfx907;
|
||||
case 1000: return sgfx1000;
|
||||
case 1010: return sgfx1010;
|
||||
case 1011: return sgfx1011;
|
||||
case 1012: return sgfx1012;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -623,6 +627,8 @@ int getIsaType(const aclTargetInfo *target)
|
||||
default: return 1000;
|
||||
case NV_NAVI10_LITE_P_A0: return 1000;
|
||||
case NV_NAVI10_P_A0: return 1010;
|
||||
case NV_NAVI12_P_A0: return 1011;
|
||||
case NV_NAVI14_M_A0: return 1012;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -219,6 +219,8 @@ static const char* calTargetMapping[] = {
|
||||
IF(IS_BRAHMA,"","gfx907"),
|
||||
IF(IS_BRAHMA,"","gfx1000"),
|
||||
IF(IS_BRAHMA,"","gfx1010"),
|
||||
IF(IS_BRAHMA,"","gfx1011"),
|
||||
IF(IS_BRAHMA,"","gfx1012"),
|
||||
};
|
||||
|
||||
#include "utils/v0_8/target_mappings_amdil.h"
|
||||
|
||||
@@ -53,6 +53,8 @@ static const TargetMapping HSAILTargetMapping_0_8[] = {
|
||||
{ "AI", "gfx907", "GFX9", amd::GPU_Library_HSAIL, AI_VEGA20_P_A0, F_AI_BASE, true, true, FAMILY_AI, true },
|
||||
{ "NV", "gfx1000", "GFX10", amd::GPU_Library_HSAIL, NV_NAVI10_LITE_P_A0, F_AI_BASE, true, true, FAMILY_NV, false },
|
||||
{ "NV", "gfx1010", "GFX10", amd::GPU_Library_HSAIL, NV_NAVI10_P_A0, F_AI_BASE, true, true, FAMILY_NV, false },
|
||||
{ "NV", "gfx1011", "GFX10", amd::GPU_Library_HSAIL, NV_NAVI12_P_A0, F_AI_BASE, true, true, FAMILY_NV, false },
|
||||
{ "NV", "gfx1012", "GFX10", amd::GPU_Library_HSAIL, NV_NAVI14_M_A0, F_AI_BASE, true, true, FAMILY_NV, false },
|
||||
|
||||
#else
|
||||
UnknownTarget,
|
||||
@@ -65,6 +67,8 @@ static const TargetMapping HSAILTargetMapping_0_8[] = {
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
#endif
|
||||
InvalidTarget
|
||||
};
|
||||
|
||||
@@ -52,6 +52,8 @@ static const TargetMapping HSAIL64TargetMapping_0_8[] = {
|
||||
{ "AI", "gfx907", "GFX9", amd::GPU_Library_HSAIL, AI_VEGA20_P_A0, F_AI_BASE, true, true, FAMILY_AI, true },
|
||||
{ "NV", "gfx1000", "GFX10", amd::GPU_Library_HSAIL, NV_NAVI10_LITE_P_A0, F_AI_BASE, true, true, FAMILY_NV, false },
|
||||
{ "NV", "gfx1010", "GFX10", amd::GPU_Library_HSAIL, NV_NAVI10_P_A0, F_AI_BASE, true, true, FAMILY_NV, false },
|
||||
{ "NV", "gfx1011", "GFX10", amd::GPU_Library_HSAIL, NV_NAVI12_P_A0, F_AI_BASE, true, true, FAMILY_NV, false },
|
||||
{ "NV", "gfx1012", "GFX10", amd::GPU_Library_HSAIL, NV_NAVI14_M_A0, F_AI_BASE, true, true, FAMILY_NV, false },
|
||||
#else
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
@@ -63,6 +65,8 @@ static const TargetMapping HSAIL64TargetMapping_0_8[] = {
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
UnknownTarget,
|
||||
#endif
|
||||
InvalidTarget
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user