rocr: Generic ISA targets support

Change-Id: I6a0341ec9c1ec1e710143676b80a8a3c1a78f725
This commit is contained in:
Chris Freehill
2024-10-17 16:36:40 -05:00
parent 08699069d6
commit 0c18ff22e1
17 changed files with 369 additions and 203 deletions
@@ -137,10 +137,11 @@ GpuAgent* DiscoverGpu(HSAuint32 node_id, HsaNodeProperties& node_prop, bool xnac
// Check for sramecc incompatibility due to sramecc not being reported correctly in kfd before
// 1.4.
if (gpu->isa()->IsSrameccSupported() && (kfd_version.KernelInterfaceMajorVersion <= 1 &&
kfd_version.KernelInterfaceMinorVersion < 4)) {
if (gpu->supported_isas()[0]->IsSrameccSupported() &&
(kfd_version.KernelInterfaceMajorVersion <= 1 &&
kfd_version.KernelInterfaceMinorVersion < 4)) {
// gfx906 has both sramecc modes in use. Suppress the device.
if ((gpu->isa()->GetProcessorName() == "gfx906") &&
if ((gpu->supported_isas()[0]->GetProcessorName() == "gfx906") &&
core::Runtime::runtime_singleton_->flag().check_sramecc_validity()) {
char name[64];
gpu->GetInfo((hsa_agent_info_t)HSA_AMD_AGENT_INFO_PRODUCT_NAME, name);
@@ -153,7 +154,7 @@ GpuAgent* DiscoverGpu(HSAuint32 node_id, HsaNodeProperties& node_prop, bool xnac
}
// gfx908 always has sramecc set to on in vbios. Set mode bit to on and recreate the device.
if (gpu->isa()->GetProcessorName() == "gfx908") {
if (gpu->supported_isas()[0]->GetProcessorName() == "gfx908") {
node_prop.Capability.ui32.SRAM_EDCSupport = 1;
delete gpu;
gpu = new GpuAgent(node_id, node_prop, xnack_mode,
@@ -260,7 +261,7 @@ void RegisterLinkInfo(uint32_t node_id, uint32_t num_link) {
*/
static void SurfaceGpuList(std::vector<int32_t>& gpu_list, bool xnack_mode, bool enabled) {
// Process user visible Gpu devices
int32_t invalidIdx = -1;
const int32_t invalidIdx = -1;
int32_t list_sz = gpu_list.size();
HsaNodeProperties node_prop = {0};
for (int32_t idx = 0; idx < list_sz; idx++) {