From 0639b53e31e4473d06568dabe737afacb47826b4 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Tue, 5 Jan 2021 17:28:19 -0600 Subject: [PATCH] Add support for gfx1032. Change-Id: I36f93a6b61e74cf17aac1a05d7c1d4ba6369fcc9 [ROCm/ROCR-Runtime commit: d39ae13420b90948a732f0d40932ce903049c439] --- .../rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt | 2 +- projects/rocr-runtime/runtime/hsa-runtime/core/runtime/isa.cpp | 1 + .../rocr-runtime/runtime/hsa-runtime/image/blit_kernel.cpp | 3 +++ .../runtime/hsa-runtime/image/blit_src/CMakeLists.txt | 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(+), 3 deletions(-) diff --git a/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt b/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt index e8ebf35537..99cb8ff5f7 100755 --- a/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt +++ b/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt @@ -41,7 +41,7 @@ set(PROJECT_NAME "rocrtst64") project (${PROJECT_NAME}) -set(DEFAULT_TARGETS "gfx700;gfx701;gfx702;gfx801;gfx802;gfx803;gfx805;gfx810;gfx900;gfx902;gfx904;gfx906;gfx908;gfx1010;gfx1011;gfx1012;gfx1030;gfx1031") +set(DEFAULT_TARGETS "gfx700;gfx701;gfx702;gfx801;gfx802;gfx803;gfx805;gfx810;gfx900;gfx902;gfx904;gfx906;gfx908;gfx1010;gfx1011;gfx1012;gfx1030;gfx1031;gfx1032") # # Currently support for Windows platform is not present 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 1eaccaa49b..6e3cfb046d 100755 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/isa.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/isa.cpp @@ -297,6 +297,7 @@ const IsaRegistry::IsaMap IsaRegistry::GetSupportedIsas() { ISAREG_ENTRY_GEN("gfx1012:xnack+", 10, 1, 2, unsupported, enabled) ISAREG_ENTRY_GEN("gfx1030", 10, 3, 0, unsupported, unsupported) ISAREG_ENTRY_GEN("gfx1031", 10, 3, 1, unsupported, unsupported) + ISAREG_ENTRY_GEN("gfx1032", 10, 3, 2, unsupported, unsupported) #undef ISAREG_ENTRY_GEN return supported_isas; } diff --git a/projects/rocr-runtime/runtime/hsa-runtime/image/blit_kernel.cpp b/projects/rocr-runtime/runtime/hsa-runtime/image/blit_kernel.cpp index eec8e27ad9..4d5a996a9b 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/image/blit_kernel.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/image/blit_kernel.cpp @@ -87,6 +87,7 @@ extern uint8_t ocl_blit_object_gfx1011[]; extern uint8_t ocl_blit_object_gfx1012[]; extern uint8_t ocl_blit_object_gfx1030[]; extern uint8_t ocl_blit_object_gfx1031[]; +extern uint8_t ocl_blit_object_gfx1032[]; // Arguments inserted by OCL compiler, all zero here. struct OCLHiddenArgs { @@ -998,6 +999,8 @@ hsa_status_t BlitKernel::GetPatchedBlitObject(const char* agent_name, *blit_code_object = ocl_blit_object_gfx1030; } else if (sname == "gfx1031") { *blit_code_object = ocl_blit_object_gfx1031; + } else if (sname == "gfx1032") { + *blit_code_object = ocl_blit_object_gfx1032; } else { return HSA_STATUS_ERROR_INVALID_ISA_NAME; } diff --git a/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt b/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt index 22148acc9f..465b1caf6b 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt +++ b/projects/rocr-runtime/runtime/hsa-runtime/image/blit_src/CMakeLists.txt @@ -69,7 +69,7 @@ endif() # Determine the target devices if not specified if (NOT DEFINED TARGET_DEVICES) - set (TARGET_DEVICES "gfx700;gfx701;gfx702;gfx801;gfx802;gfx803;gfx805;gfx810;gfx900;gfx902;gfx904;gfx906;gfx908;gfx1010;gfx1011;gfx1012;gfx1030;gfx1031") + set (TARGET_DEVICES "gfx700;gfx701;gfx702;gfx801;gfx802;gfx803;gfx805;gfx810;gfx900;gfx902;gfx904;gfx906;gfx908;gfx1010;gfx1011;gfx1012;gfx1030;gfx1031;gfx1032") endif() set( TARGET_DEVICES ${TARGET_DEVICES} CACHE STRING "Build targets" FORCE ) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp b/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp index fa6e84b827..25433cc97a 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.cpp @@ -98,6 +98,7 @@ namespace loader { gfx1012.handle = 1012; gfx1030.handle = 1030; gfx1031.handle = 1031; + gfx1032.handle = 1032; } hsa_isa_t OfflineLoaderContext::IsaFromName(const char *name) @@ -157,6 +158,8 @@ namespace loader { return gfx1030; } else if (sname == "AMD:AMDGPU:10:3:1") { return gfx1031; + } else if (sname == "AMD:AMDGPU:10:3:2") { + return gfx1032; } // The offline loader only supports code object v2 which only supports diff --git a/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp b/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp index 49f27c93a0..4c08332554 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/loader/loaders.hpp @@ -58,7 +58,7 @@ namespace loader { hsa_isa_t gfx700, gfx701, gfx702, gfx703, gfx704, gfx705; hsa_isa_t gfx800, gfx801, gfx802, gfx803, gfx804, gfx805, gfx810; hsa_isa_t gfx900, gfx901, gfx902, gfx904, gfx906, gfx908; - hsa_isa_t gfx1010, gfx1011, gfx1012, gfx1030, gfx1031; + hsa_isa_t gfx1010, gfx1011, gfx1012, gfx1030, gfx1031, gfx1032; std::ostream& out; typedef std::set PointerSet; PointerSet pointers;