diff --git a/projects/clr/hipamd/src/hip_hcc.cpp b/projects/clr/hipamd/src/hip_hcc.cpp index f509409334..7150140e12 100644 --- a/projects/clr/hipamd/src/hip_hcc.cpp +++ b/projects/clr/hipamd/src/hip_hcc.cpp @@ -787,11 +787,13 @@ hipError_t ihipDevice_t::initProperties(hipDeviceProp_t* prop) { err = hsa_agent_get_info(_hsaAgent, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_BDFID, &bdf_id); DeviceErrorCheck(err); - // BDFID is 16bit uint: [8bit - BusID | 5bit - Device ID | 3bit - Function/DomainID] - prop->pciDomainID = bdf_id & 0x7; + // BDFID is 16bit uint: [8bit - BusID | 5bit - Device ID | 3bit - FunctionID] prop->pciDeviceID = (bdf_id >> 3) & 0x1F; prop->pciBusID = (bdf_id >> 8) & 0xFF; + err = hsa_agent_get_info(_hsaAgent, (hsa_agent_info_t)HSA_AMD_AGENT_INFO_DOMAIN, &prop->pciDomainID); + DeviceErrorCheck(err); + // Masquerade as a 3.0-level device. This will change as more HW functions are properly // supported. Application code should use the arch.has* to do detailed feature detection. prop->major = 3;