From 9e97c1acd12c690ffd8fbef37bb74ad9763a1430 Mon Sep 17 00:00:00 2001 From: Chris Freehill Date: Tue, 29 Oct 2019 19:35:17 -0500 Subject: [PATCH] Add gfx1030 support Change-Id: I4bccc731ba802480925f98c6c42593503bf9b98d [ROCm/ROCR-Runtime commit: e702531b40074f83f3d1247f117bd5cd9bd428d1] --- projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa.cpp | 2 ++ projects/rocr-runtime/runtime/hsa-runtime/core/runtime/isa.cpp | 1 + .../rocr-runtime/runtime/hsa-runtime/image/device_info.cpp | 1 + .../runtime/hsa-runtime/libamdhsacode/amd_hsa_code.cpp | 2 ++ projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp | 3 +++ projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp | 2 +- 6 files changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa.cpp index 705613a695..0db04f4d0d 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa.cpp @@ -1888,6 +1888,8 @@ static std::string ConvertOldTargetNameToNew( NewName = "amdgcn-amd-amdhsa--gfx1011"; else if (OldName == "AMD:AMDGPU:10:1:2") NewName = "amdgcn-amd-amdhsa--gfx1012"; + else if (OldName == "AMD:AMDGPU:10:3:0") + NewName = "amdgcn-amd-amdhsa--gfx1030"; else assert(false && "Unhandled target"); diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/isa.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/isa.cpp index 68a3fb2085..5b6e1ae408 100755 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/isa.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/isa.cpp @@ -236,6 +236,7 @@ const IsaRegistry::IsaMap IsaRegistry::GetSupportedIsas() { ISAREG_ENTRY_GEN(10, 1, 1, true, false) ISAREG_ENTRY_GEN(10, 1, 2, false, false) ISAREG_ENTRY_GEN(10, 1, 2, true, false) + ISAREG_ENTRY_GEN(10, 3, 0, false, false) return supported_isas; } diff --git a/projects/rocr-runtime/runtime/hsa-runtime/image/device_info.cpp b/projects/rocr-runtime/runtime/hsa-runtime/image/device_info.cpp index 355d51f90b..fec0a5849a 100755 --- a/projects/rocr-runtime/runtime/hsa-runtime/image/device_info.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/image/device_info.cpp @@ -181,6 +181,7 @@ uint32_t DevIDToAddrLibFamily(uint32_t dev_id) { switch (minor_ver) { case 0: case 1: // Navi + case 3: switch (step) { case 0: case 1: diff --git a/projects/rocr-runtime/runtime/hsa-runtime/libamdhsacode/amd_hsa_code.cpp b/projects/rocr-runtime/runtime/hsa-runtime/libamdhsacode/amd_hsa_code.cpp index edf4e04efc..70a55f3cde 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/libamdhsacode/amd_hsa_code.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/libamdhsacode/amd_hsa_code.cpp @@ -586,6 +586,8 @@ namespace code { NewName = "amdgcn-amd-amdhsa--gfx1011"; else if (OldName == "AMD:AMDGPU:10:1:2") NewName = "amdgcn-amd-amdhsa--gfx1012"; + else if (OldName == "AMD:AMDGPU:10:3:0") + NewName = "amdgcn-amd-amdhsa--gfx1030"; else assert(false && "Unhandled target"); diff --git a/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp b/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp index 2c8dad0e14..cd154d32c4 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp @@ -96,6 +96,7 @@ namespace loader { gfx1010.handle = 1010; gfx1011.handle = 1011; gfx1012.handle = 1012; + gfx1030.handle = 1030; } hsa_isa_t OfflineLoaderContext::IsaFromName(const char *name) @@ -133,6 +134,8 @@ namespace loader { return gfx1011; } else if (sname == "AMD:AMDGPU:10:1:2") { return gfx1012; + } else if (sname == "AMD:AMDGPU:10:3:0") { + return gfx1030; } assert(0); diff --git a/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp b/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp index 728d6d0832..3d3ee65dc6 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp @@ -57,7 +57,7 @@ namespace loader { hsa_isa_t invalid; hsa_isa_t gfx700, gfx701, gfx800, gfx801, gfx802, gfx803, gfx804, gfx810; hsa_isa_t gfx900, gfx901, gfx902, gfx903, gfx908; - hsa_isa_t gfx1010, gfx1011, gfx1012; + hsa_isa_t gfx1010, gfx1011, gfx1012, gfx1030; std::ostream& out; typedef std::set PointerSet; PointerSet pointers;