From 29cc3945101cec36bf2bcb330507bb4ea568bdd1 Mon Sep 17 00:00:00 2001 From: taosang2 Date: Mon, 29 Jan 2024 21:02:31 -0500 Subject: [PATCH] SWDEV-513458 - Add gfx950 target ID Add gfx950 target ID Cherry-picked https://gerrit-git.amd.com/c/compute/ec/clr/+/997678 https://gerrit-git.amd.com/c/compute/ec/clr/+/1063519 Change-Id: I0228c5e87ceec366983fd4afb1c25e7f8161c2c2 --- hipamd/src/amd_hsa_elf.hpp | 3 +-- hipamd/src/hip_code_object.cpp | 5 +++++ hipamd/src/hiprtc/hiprtcComgrHelper.cpp | 5 +++++ rocclr/device/device.cpp | 9 +++++++++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/hipamd/src/amd_hsa_elf.hpp b/hipamd/src/amd_hsa_elf.hpp index 719408f184..e83c7a4bac 100644 --- a/hipamd/src/amd_hsa_elf.hpp +++ b/hipamd/src/amd_hsa_elf.hpp @@ -110,7 +110,7 @@ enum : unsigned { EF_AMDGPU_MACH_AMDGCN_GFX942 = 0x04c, EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4D = 0x04d, EF_AMDGPU_MACH_AMDGCN_GFX1201 = 0x04e, - EF_AMDGPU_MACH_AMDGCN_RESERVED_0X4F = 0x04f, + EF_AMDGPU_MACH_AMDGCN_GFX950 = 0x04f, EF_AMDGPU_MACH_AMDGCN_RESERVED_0X50 = 0x050, EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC = 0x051, EF_AMDGPU_MACH_AMDGCN_GFX10_1_GENERIC = 0x052, @@ -123,7 +123,6 @@ enum : unsigned { EF_AMDGPU_MACH_AMDGCN_GFX12_GENERIC = 0x059, EF_AMDGPU_MACH_AMDGCN_GFX9_4_GENERIC = 0x05f, - // First/last AMDGCN-based processors. EF_AMDGPU_MACH_AMDGCN_FIRST = EF_AMDGPU_MACH_AMDGCN_GFX600, EF_AMDGPU_MACH_AMDGCN_LAST = EF_AMDGPU_MACH_AMDGCN_GFX9_4_GENERIC, diff --git a/hipamd/src/hip_code_object.cpp b/hipamd/src/hip_code_object.cpp index b345323e34..773df8b181 100644 --- a/hipamd/src/hip_code_object.cpp +++ b/hipamd/src/hip_code_object.cpp @@ -239,6 +239,11 @@ static bool getProcName(uint32_t EFlags, std::string& proc_name, bool& xnackSupp sramEccSupported = true; proc_name = "gfx942"; break; + case EF_AMDGPU_MACH_AMDGCN_GFX950: + xnackSupported = true; + sramEccSupported = true; + proc_name = "gfx950"; + break; case EF_AMDGPU_MACH_AMDGCN_GFX1010: xnackSupported = true; sramEccSupported = false; diff --git a/hipamd/src/hiprtc/hiprtcComgrHelper.cpp b/hipamd/src/hiprtc/hiprtcComgrHelper.cpp index dd0c676de6..5d0dd74bf9 100644 --- a/hipamd/src/hiprtc/hiprtcComgrHelper.cpp +++ b/hipamd/src/hiprtc/hiprtcComgrHelper.cpp @@ -172,6 +172,11 @@ static bool getProcName(uint32_t EFlags, std::string& proc_name, bool& xnackSupp sramEccSupported = true; proc_name = "gfx942"; break; + case EF_AMDGPU_MACH_AMDGCN_GFX950: + xnackSupported = true; + sramEccSupported = true; + proc_name = "gfx950"; + break; case EF_AMDGPU_MACH_AMDGCN_GFX1010: xnackSupported = true; sramEccSupported = false; diff --git a/rocclr/device/device.cpp b/rocclr/device/device.cpp index 61b3dde497..ba512962cc 100644 --- a/rocclr/device/device.cpp +++ b/rocclr/device/device.cpp @@ -200,6 +200,15 @@ std::pair Isa::supportedIsas() { {"gfx90c", nullptr, true, true, 9, 0, 12, NONE, ANY, 4, 16, 1, 256, 64 * Ki, 32}, {"gfx90c:xnack-", "gfx90c", true, true, 9, 0, 12, NONE, OFF, 4, 16, 1, 256, 64 * Ki, 32}, {"gfx90c:xnack+", "gfx90d", true, true, 9, 0, 12, NONE, ON, 4, 16, 1, 256, 64 * Ki, 32}, + {"gfx950", nullptr, true, false, 9, 5, 0, ANY, ANY, 4, 16, 1, 256, 160* Ki, 64}, + {"gfx950:sramecc-", nullptr, true, false, 9, 5, 0, OFF, ANY, 4, 16, 1, 256, 160* Ki, 64}, + {"gfx950:sramecc+", nullptr, true, false, 9, 5, 0, ON, ANY, 4, 16, 1, 256, 160* Ki, 64}, + {"gfx950:xnack-", nullptr, true, false, 9, 5, 0, ANY, OFF, 4, 16, 1, 256, 160* Ki, 64}, + {"gfx950:xnack+", nullptr, true, false, 9, 5, 0, ANY, ON, 4, 16, 1, 256, 160* Ki, 64}, + {"gfx950:sramecc-:xnack-", nullptr, true, false, 9, 5, 0, OFF, OFF, 4, 16, 1, 256, 160* Ki, 64}, + {"gfx950:sramecc-:xnack+", nullptr, true, false, 9, 5, 0, OFF, ON, 4, 16, 1, 256, 160* Ki, 64}, + {"gfx950:sramecc+:xnack-", nullptr, true, false, 9, 5, 0, ON, OFF, 4, 16, 1, 256, 160* Ki, 64}, + {"gfx950:sramecc+:xnack+", nullptr, true, false, 9, 5, 0, ON, ON, 4, 16, 1, 256, 160* Ki, 64}, {"gfx9-generic", nullptr, true, true, 9, 0, 0, NONE, ANY, 4, 16, 1, 256, 64 * Ki, 32}, {"gfx9-generic:xnack-", nullptr, true, true, 9, 0, 0, NONE, OFF, 4, 16, 1, 256, 64 * Ki, 32}, {"gfx9-generic:xnack+", nullptr, true, true, 9, 0, 0, NONE, ON, 4, 16, 1, 256, 64 * Ki, 32},