Squash merge of cfreehil/amd-temp-gfx90a onto amd-staging.
Includes some workarounds and HMM. Conflicts: opensrc/hsa-runtime/core/runtime/amd_topology.cpp opensrc/hsa-runtime/core/util/flag.h Change-Id: I22976f07964a43dbb228a6231777dbd599112b8d
This commit is contained in:
@@ -82,6 +82,7 @@ extern uint8_t ocl_blit_object_gfx902[];
|
||||
extern uint8_t ocl_blit_object_gfx904[];
|
||||
extern uint8_t ocl_blit_object_gfx906[];
|
||||
extern uint8_t ocl_blit_object_gfx908[];
|
||||
extern uint8_t ocl_blit_object_gfx90a[];
|
||||
extern uint8_t ocl_blit_object_gfx1010[];
|
||||
extern uint8_t ocl_blit_object_gfx1011[];
|
||||
extern uint8_t ocl_blit_object_gfx1012[];
|
||||
@@ -990,6 +991,8 @@ hsa_status_t BlitKernel::GetPatchedBlitObject(const char* agent_name,
|
||||
*blit_code_object = ocl_blit_object_gfx906;
|
||||
} else if (sname == "gfx908") {
|
||||
*blit_code_object = ocl_blit_object_gfx908;
|
||||
} else if (sname == "gfx90a") {
|
||||
*blit_code_object = ocl_blit_object_gfx90a;
|
||||
} else if (sname == "gfx1010") {
|
||||
*blit_code_object = ocl_blit_object_gfx1010;
|
||||
} else if (sname == "gfx1011") {
|
||||
|
||||
@@ -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;gfx1032;gfx1033")
|
||||
set (TARGET_DEVICES "gfx700;gfx701;gfx702;gfx801;gfx802;gfx803;gfx805;gfx810;gfx900;gfx902;gfx904;gfx906;gfx908;gfx90a;gfx1010;gfx1011;gfx1012;gfx1030;gfx1031;gfx1032;gfx1033")
|
||||
endif()
|
||||
set( TARGET_DEVICES ${TARGET_DEVICES} CACHE STRING "Build targets" FORCE )
|
||||
|
||||
|
||||
@@ -50,17 +50,11 @@
|
||||
namespace rocr {
|
||||
namespace image {
|
||||
|
||||
uint32_t MajorVerFromDevID(uint32_t dev_id) {
|
||||
return dev_id/100;
|
||||
}
|
||||
uint32_t MajorVerFromDevID(uint32_t dev_id) { return dev_id >> 8; }
|
||||
|
||||
uint32_t MinorVerFromDevID(uint32_t dev_id) {
|
||||
return (dev_id % 100)/10;
|
||||
}
|
||||
uint32_t MinorVerFromDevID(uint32_t dev_id) { return (dev_id >> 4) & 0xF; }
|
||||
|
||||
uint32_t StepFromDevID(uint32_t dev_id) {
|
||||
return (dev_id%100)%10;
|
||||
}
|
||||
uint32_t StepFromDevID(uint32_t dev_id) { return dev_id & 0xF; }
|
||||
|
||||
hsa_status_t GetGPUAsicID(hsa_agent_t agent, uint32_t *chip_id) {
|
||||
char asic_name[64];
|
||||
@@ -78,7 +72,10 @@ hsa_status_t GetGPUAsicID(hsa_agent_t agent, uint32_t *chip_id) {
|
||||
assert(a_str.compare(0, 3, "gfx", 3) == 0);
|
||||
|
||||
a_str.erase(0,3);
|
||||
*chip_id = std::stoi(a_str);
|
||||
|
||||
// Load chip_id accounting for stepping and minor in hex and major in dec.
|
||||
*chip_id = std::stoi(a_str.substr(a_str.length() - 2), nullptr, 16);
|
||||
*chip_id += (std::stoi(a_str.substr(0, a_str.length() - 2)) << 8);
|
||||
return HSA_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -163,6 +160,7 @@ uint32_t DevIDToAddrLibFamily(uint32_t dev_id) {
|
||||
case 4: // Vega12
|
||||
case 6: // Vega20
|
||||
case 8: // Arcturus
|
||||
case 10: // Aldebaran
|
||||
return FAMILY_AI;
|
||||
|
||||
case 2:
|
||||
|
||||
Reference in New Issue
Block a user