Make supported targets consistent

Add missing target names and make all parts consistent with which
targets are supported.

- Add gfx805 as a supported target.

- Add all ELF targets to genric code.

- Make offline loader match supported targets.

Change-Id: Idab4d69edc71645aecaa83aa55e29c1aeee4c1d6


[ROCm/ROCR-Runtime commit: b443397bcc]
This commit is contained in:
Tony
2020-11-24 01:38:49 +00:00
parent 62138712cf
commit b36aad204e
9 changed files with 170 additions and 128 deletions
@@ -82,16 +82,16 @@ namespace loader {
invalid.handle = 0;
gfx700.handle = 700;
gfx701.handle = 701;
gfx800.handle = 800;
gfx702.handle = 702;
gfx801.handle = 801;
gfx802.handle = 802;
gfx803.handle = 803;
gfx804.handle = 804;
gfx805.handle = 805;
gfx810.handle = 810;
gfx900.handle = 900;
gfx901.handle = 901;
gfx902.handle = 902;
gfx903.handle = 903;
gfx904.handle = 904;
gfx906.handle = 906;
gfx908.handle = 908;
gfx1010.handle = 1010;
gfx1011.handle = 1011;
@@ -107,6 +107,14 @@ namespace loader {
return gfx700;
} else if (sname == "AMD:AMDGPU:7:0:1") {
return gfx701;
} else if (sname == "AMD:AMDGPU:7:0:2") {
return gfx702;
} else if (sname == "AMD:AMDGPU:7:0:3") {
return gfx703;
} else if (sname == "AMD:AMDGPU:7:0:4") {
return gfx704;
} else if (sname == "AMD:AMDGPU:7:0:5") {
return gfx705;
} else if (sname == "AMD:AMDGPU:8:0:0") {
return gfx800;
} else if (sname == "AMD:AMDGPU:8:0:1") {
@@ -117,6 +125,8 @@ namespace loader {
return gfx803;
} else if (sname == "AMD:AMDGPU:8:0:4") {
return gfx804;
} else if (sname == "AMD:AMDGPU:8:0:5") {
return gfx805;
} else if (sname == "AMD:AMDGPU:8:1:0") {
return gfx810;
} else if (sname == "AMD:AMDGPU:9:0:0") {
@@ -126,7 +136,15 @@ namespace loader {
} else if (sname == "AMD:AMDGPU:9:0:2") {
return gfx902;
} else if (sname == "AMD:AMDGPU:9:0:3") {
return gfx903;
return gfx902;
} else if (sname == "AMD:AMDGPU:9:0:4") {
return gfx904;
} else if (sname == "AMD:AMDGPU:9:0:5") {
return gfx904;
} else if (sname == "AMD:AMDGPU:9:0:6") {
return gfx906;
} else if (sname == "AMD:AMDGPU:9:0:7") {
return gfx906;
} else if (sname == "AMD:AMDGPU:9:0:8") {
return gfx908;
} else if (sname == "AMD:AMDGPU:10:1:0") {
@@ -141,6 +159,9 @@ namespace loader {
return gfx1031;
}
// The offline loader only supports code object v2 which only supports
// asics up to gfx906. Do NOT add handling of new asics into this
// if-else-if* block.
assert(0);
return invalid;
}
@@ -55,8 +55,9 @@ namespace loader {
class OfflineLoaderContext : public amd::hsa::loader::Context {
private:
hsa_isa_t invalid;
hsa_isa_t gfx700, gfx701, gfx800, gfx801, gfx802, gfx803, gfx804, gfx810;
hsa_isa_t gfx900, gfx901, gfx902, gfx903, gfx908;
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;
std::ostream& out;
typedef std::set<void*> PointerSet;