Fix PCI Domain ID query (#1424)
* Fix PCI Domain ID query
* Update BDF comment
[ROCm/clr commit: e2260d82a6]
Этот коммит содержится в:
коммит произвёл
Maneesh Gupta
родитель
3096ae5ad7
Коммит
09bb83cf2c
@@ -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;
|
||||
|
||||
Ссылка в новой задаче
Block a user