rocr: Add support for gfx950
<squashed with patch for gfx950 generic targets>
Signed-off-by: Chris Freehill <Chris.Freehill@amd.com>
Change-Id: Ifec6d93cf46c7fbf736c6572882299e279260af6
[ROCm/ROCR-Runtime commit: dab8f2fc65]
This commit is contained in:
committed by
Amber Lin
vanhempi
bda034bb82
commit
d0ae8b2eb5
@@ -391,6 +391,8 @@ void GpuAgent::AssembleShader(const char* func_name, AssembleTarget assemble_tar
|
||||
asic_shader = &compiled_shader_it->second.compute_942;
|
||||
break;
|
||||
}
|
||||
} else if(isa_->GetMinorVersion() == 5) {
|
||||
asic_shader = &compiled_shader_it->second.compute_942;
|
||||
} else {
|
||||
asic_shader = &compiled_shader_it->second.compute_9;
|
||||
}
|
||||
@@ -447,10 +449,10 @@ void GpuAgent::AssembleShader(const char* func_name, AssembleTarget assemble_tar
|
||||
AMD_HSA_BITS_SET(header->compute_pgm_rsrc2,
|
||||
AMD_COMPUTE_PGM_RSRC_TWO_ENABLE_SGPR_WORKGROUP_ID_X, 1);
|
||||
|
||||
// gfx90a, gfx940, gfx941, gfx942
|
||||
// gfx90a, gfx940, gfx941, gfx942, gfx950
|
||||
if ((isa_->GetMajorVersion() == 9) &&
|
||||
(((isa_->GetMinorVersion() == 0) && (isa_->GetStepping() == 10)) ||
|
||||
(isa_->GetMinorVersion() == 4))) {
|
||||
(isa_->GetMinorVersion() == 4 || isa_->GetMinorVersion() == 5))) {
|
||||
// Program COMPUTE_PGM_RSRC3.ACCUM_OFFSET for 0 ACC VGPRs on gfx90a.
|
||||
// FIXME: Assemble code objects from source at build time
|
||||
int gran_accvgprs = ((gran_vgprs + 1) * 8) / 4 - 1;
|
||||
@@ -1314,7 +1316,8 @@ hsa_status_t GpuAgent::GetInfo(hsa_agent_info_t attribute, void* value) const {
|
||||
constexpr size_t hsa_name_size = 63;
|
||||
|
||||
const bool isa_has_image_support =
|
||||
(isa_->GetMajorVersion() == 9 && isa_->GetMinorVersion() == 4) ? false : true;
|
||||
(isa_->GetMajorVersion() == 9 &&
|
||||
(isa_->GetMinorVersion() == 4 || isa_->GetMinorVersion() == 5)) ? false : true;
|
||||
|
||||
switch (attribute_u) {
|
||||
case HSA_AGENT_INFO_NAME: {
|
||||
@@ -2237,7 +2240,8 @@ void GpuAgent::BindTrapHandler() {
|
||||
trap_code_buf_size_);
|
||||
} else {
|
||||
if (isa_->GetMajorVersion() >= 11 ||
|
||||
(isa_->GetMajorVersion() == 9 && isa_->GetMinorVersion() == 4)) {
|
||||
(isa_->GetMajorVersion() == 9 &&
|
||||
(isa_->GetMinorVersion() == 4 || isa_->GetMinorVersion() == 5))) {
|
||||
// No trap handler support without exception handling, soft error.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -422,6 +422,15 @@ const IsaRegistry::IsaMap& IsaRegistry::GetSupportedIsas() {
|
||||
ISAREG_ENTRY_GEN("gfx942:sramecc-:xnack+", 9, 4, 2, disabled, enabled, 64, "gfx9-4-generic:sramecc-:xnack+")
|
||||
ISAREG_ENTRY_GEN("gfx942:sramecc+:xnack-", 9, 4, 2, enabled, disabled, 64, "gfx9-4-generic:sramecc+:xnack-")
|
||||
ISAREG_ENTRY_GEN("gfx942:sramecc+:xnack+", 9, 4, 2, enabled, enabled, 64, "gfx9-4-generic:sramecc+:xnack+")
|
||||
ISAREG_ENTRY_GEN("gfx950", 9, 5, 0, any, any, 64, "gfx9-4-generic")
|
||||
ISAREG_ENTRY_GEN("gfx950:xnack-", 9, 5, 0, any, disabled, 64, "gfx9-4-generic:xnack-")
|
||||
ISAREG_ENTRY_GEN("gfx950:xnack+", 9, 5, 0, any, enabled, 64, "gfx9-4-generic:xnack+")
|
||||
ISAREG_ENTRY_GEN("gfx950:sramecc-", 9, 5, 0, disabled, any, 64, "gfx9-4-generic:sramecc-")
|
||||
ISAREG_ENTRY_GEN("gfx950:sramecc+", 9, 5, 0, enabled, any, 64, "gfx9-4-generic:sramecc+")
|
||||
ISAREG_ENTRY_GEN("gfx950:sramecc-:xnack-", 9, 5, 0, disabled, disabled, 64, "gfx9-4-generic:sramecc-:xnack-")
|
||||
ISAREG_ENTRY_GEN("gfx950:sramecc-:xnack+", 9, 5, 0, disabled, enabled, 64, "gfx9-4-generic:sramecc-:xnack+")
|
||||
ISAREG_ENTRY_GEN("gfx950:sramecc+:xnack-", 9, 5, 0, enabled, disabled, 64, "gfx9-4-generic:sramecc+:xnack-")
|
||||
ISAREG_ENTRY_GEN("gfx950:sramecc+:xnack+", 9, 5, 0, enabled, enabled, 64, "gfx9-4-generic:sramecc+:xnack+")
|
||||
ISAREG_ENTRY_GEN("gfx1010", 10, 1, 0, unsupported, any, 32, "gfx10-1-generic")
|
||||
ISAREG_ENTRY_GEN("gfx1010:xnack-", 10, 1, 0, unsupported, disabled, 32, "gfx10-1-generic:xnack-")
|
||||
ISAREG_ENTRY_GEN("gfx1010:xnack+", 10, 1, 0, unsupported, enabled, 32, "gfx10-1-generic:xnack+")
|
||||
|
||||
+3
-3
@@ -46,9 +46,9 @@ cmake_minimum_required ( VERSION 3.7 )
|
||||
find_package(Clang REQUIRED HINTS ${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm )
|
||||
find_package(LLVM REQUIRED HINTS ${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm )
|
||||
|
||||
set (TARGET_DEVS "gfx900;gfx940;gfx941;gfx942;gfx1010;gfx1030;gfx1100;gfx1200")
|
||||
set (POSTFIX "9;940;941;942;1010;10;11;12")
|
||||
set (SOURCE_SUFFIX ";;;;;;;_gfx12")
|
||||
set (TARGET_DEVS "gfx900;gfx940;gfx941;gfx942;gfx950;gfx1010;gfx1030;gfx1100;gfx1200")
|
||||
set (POSTFIX "9;940;941;942;950;1010;10;11;12")
|
||||
set (SOURCE_SUFFIX ";;;;;;;;_gfx12")
|
||||
|
||||
if(${CMAKE_VERBOSE_MAKEFILE})
|
||||
get_property(clang_path TARGET clang PROPERTY LOCATION)
|
||||
|
||||
Viittaa uudesa ongelmassa
Block a user