From 3cd4461a7d650af5b44292a0fb3539cad47e4139 Mon Sep 17 00:00:00 2001 From: Chris Freehill Date: Mon, 24 Jun 2019 15:55:11 -0500 Subject: [PATCH] gfx908 loader/isa related changes Change-Id: I638d4b2b300ac5a99d4d31d4fadcfe9e1e3c7748 [ROCm/ROCR-Runtime commit: 6588165de18826c673dfc582e5e0268c4a9a16c2] --- projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa.cpp | 2 ++ projects/rocr-runtime/runtime/hsa-runtime/inc/amd_hsa_elf.h | 1 + .../runtime/hsa-runtime/libamdhsacode/amd_hsa_code.cpp | 3 +++ 3 files changed, 6 insertions(+) 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 5c71f76f35..bbb599db40 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/hsa.cpp @@ -1885,6 +1885,8 @@ static std::string ConvertOldTargetNameToNew( NewName = "amdgcn-amd-amdhsa--gfx904"; else if (OldName == "AMD:AMDGPU:9:0:6") NewName = "amdgcn-amd-amdhsa--gfx906"; + else if (OldName == "AMD:AMDGPU:9:0:8") + NewName = "amdgcn-amd-amdhsa--gfx908"; else assert(false && "Unhandled target"); diff --git a/projects/rocr-runtime/runtime/hsa-runtime/inc/amd_hsa_elf.h b/projects/rocr-runtime/runtime/hsa-runtime/inc/amd_hsa_elf.h index 60f0c6d44a..edee526055 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/inc/amd_hsa_elf.h +++ b/projects/rocr-runtime/runtime/hsa-runtime/inc/amd_hsa_elf.h @@ -66,6 +66,7 @@ #define EF_AMDGPU_MACH_AMDGCN_GFX902_LC 0x02d #define EF_AMDGPU_MACH_AMDGCN_GFX904_LC 0x02e #define EF_AMDGPU_MACH_AMDGCN_GFX906_LC 0x02f +#define EF_AMDGPU_MACH_AMDGCN_GFX908_LC 0x030 #define EF_AMDGPU_MACH_AMDGCN_GFX909_LC 0x031 #define EF_AMDGPU_XNACK_LC 0x100 #define EF_AMDGPU_SRAM_ECC_LC 0x200 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 86570e7b91..8bec5b2d56 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 @@ -577,6 +577,8 @@ namespace code { NewName = "amdgcn-amd-amdhsa--gfx904"; else if (OldName == "AMD:AMDGPU:9:0:6") NewName = "amdgcn-amd-amdhsa--gfx906"; + else if (OldName == "AMD:AMDGPU:9:0:8") + NewName = "amdgcn-amd-amdhsa--gfx908"; else assert(false && "Unhandled target"); @@ -628,6 +630,7 @@ namespace code { case EF_AMDGPU_MACH_AMDGCN_GFX902_LC: isaName += "gfx902"; break; case EF_AMDGPU_MACH_AMDGCN_GFX904_LC: isaName += "gfx904"; break; case EF_AMDGPU_MACH_AMDGCN_GFX906_LC: isaName += "gfx906"; break; + case EF_AMDGPU_MACH_AMDGCN_GFX908_LC: isaName += "gfx908"; break; default: return false; }