From b009cc829cc085e97213d8f86329d6d98ebb3043 Mon Sep 17 00:00:00 2001 From: foreman Date: Tue, 5 Mar 2019 11:16:54 -0500 Subject: [PATCH] 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 --- rocclr/compiler/lib/backends/common/linker.cpp | 4 +++- rocclr/compiler/lib/utils/v0_8/libUtils.cpp | 6 ++++++ rocclr/compiler/lib/utils/v0_8/target_mappings.h | 2 ++ rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h | 4 ++++ rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h | 4 ++++ 5 files changed, 19 insertions(+), 1 deletion(-) diff --git a/rocclr/compiler/lib/backends/common/linker.cpp b/rocclr/compiler/lib/backends/common/linker.cpp index e3ce0982fa..c2295e6e86 100644 --- a/rocclr/compiler/lib/backends/common/linker.cpp +++ b/rocclr/compiler/lib/backends/common/linker.cpp @@ -591,7 +591,9 @@ amdcl::OCLLinker::link(llvm::Module* input, std::vectorgetContext().setAMDLLVMContextHook(&hookup_); diff --git a/rocclr/compiler/lib/utils/v0_8/libUtils.cpp b/rocclr/compiler/lib/utils/v0_8/libUtils.cpp index 7f0cd50697..6e0289fa87 100644 --- a/rocclr/compiler/lib/utils/v0_8/libUtils.cpp +++ b/rocclr/compiler/lib/utils/v0_8/libUtils.cpp @@ -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; } } } diff --git a/rocclr/compiler/lib/utils/v0_8/target_mappings.h b/rocclr/compiler/lib/utils/v0_8/target_mappings.h index b5a4278170..6ce3b6edba 100644 --- a/rocclr/compiler/lib/utils/v0_8/target_mappings.h +++ b/rocclr/compiler/lib/utils/v0_8/target_mappings.h @@ -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" diff --git a/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h b/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h index 853148c539..02000cef5b 100644 --- a/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.h +++ b/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail.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 }; diff --git a/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h b/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h index 97abdc30ed..dfd6ef0653 100644 --- a/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h +++ b/rocclr/compiler/lib/utils/v0_8/target_mappings_hsail64.h @@ -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 };