Correct code object V2 support

- Remove gfx800, gfx804 and gfx901 as they do not exist.
- Map the V2 note record of "AMD:AMDGPU:8:0:0" to gfx802 as they are
  the same target just connected to a differnt motherboard.
- Correct typo for supporting gfx902:xnack+.
- Support agent names with a minor or stepping version greater than 9.

Change-Id: Ife933449f60ab4687e2aaab9baf4c9fc5b86339d
이 커밋은 다음에 포함됨:
Tony
2020-12-05 17:11:01 +00:00
커밋한 사람 Tony Tye
부모 7e2ba23566
커밋 12eb2764cd
6개의 변경된 파일75개의 추가작업 그리고 102개의 파일을 삭제
+13 -11
파일 보기
@@ -2,24 +2,24 @@
//
// The University of Illinois/NCSA
// Open Source License (NCSA)
//
//
// Copyright (c) 2014-2020, Advanced Micro Devices, Inc. All rights reserved.
//
//
// Developed by:
//
//
// AMD Research and AMD HSA Software Development
//
//
// Advanced Micro Devices, Inc.
//
//
// www.amd.com
//
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal with the Software without restriction, including without limitation
// the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and/or sell copies of the Software, and to permit persons to whom the
// Software is furnished to do so, subject to the following conditions:
//
//
// - Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimers.
// - Redistributions in binary form must reproduce the above copyright
@@ -29,7 +29,7 @@
// nor the names of its contributors may be used to endorse or promote
// products derived from this Software without specific prior written
// permission.
//
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -90,9 +90,11 @@ bool Isa::IsCompatible(const Isa &code_object_isa,
std::string Isa::GetFullName() const {
std::stringstream full_name;
auto fmt = full_name.flags();
full_name << GetArchitecture() << "-" << GetVendor() << "-" << GetOS() << "-"
<< GetEnvironment() << "-gfx" << GetMajorVersion()
<< GetMinorVersion() << GetStepping();
<< std::hex << GetMinorVersion() << GetStepping();
full_name.flags(fmt);
switch (sramecc_) {
case IsaFeature::Disabled:
@@ -231,7 +233,7 @@ const IsaRegistry::IsaMap IsaRegistry::supported_isas_ =
IsaRegistry::GetSupportedIsas();
const IsaRegistry::IsaMap IsaRegistry::GetSupportedIsas() {
#define ISAREG_ENTRY_GEN(name, maj, min, stp, sramecc, xnack) \
#define ISAREG_ENTRY_GEN(name, maj, min, stp, sramecc, xnack) \
Isa amd_amdgpu_##maj##min##stp##_SRAMECC_##sramecc##_XNACK_##xnack; \
amd_amdgpu_##maj##min##stp##_SRAMECC_##sramecc##_XNACK_##xnack.version_ = Isa::Version(maj, min, stp); \
amd_amdgpu_##maj##min##stp##_SRAMECC_##sramecc##_XNACK_##xnack.sramecc_ = sramecc; \
@@ -264,7 +266,7 @@ const IsaRegistry::IsaMap IsaRegistry::GetSupportedIsas() {
ISAREG_ENTRY_GEN("gfx900:xnack+", 9, 0, 0, unsupported, enabled)
ISAREG_ENTRY_GEN("gfx902", 9, 0, 2, unsupported, any)
ISAREG_ENTRY_GEN("gfx902:xnack-", 9, 0, 2, unsupported, disabled)
ISAREG_ENTRY_GEN("gfx900:xnack+", 9, 0, 2, unsupported, enabled)
ISAREG_ENTRY_GEN("gfx902:xnack+", 9, 0, 2, unsupported, enabled)
ISAREG_ENTRY_GEN("gfx904", 9, 0, 4, unsupported, any)
ISAREG_ENTRY_GEN("gfx904:xnack-", 9, 0, 4, unsupported, disabled)
ISAREG_ENTRY_GEN("gfx904:xnack+", 9, 0, 4, unsupported, enabled)