2
0

Changed hipDeviceGetPCIBusId to return Bus ID as string

Change-Id: I6d5aa7362084109d34bc015d948f8723b2a38ee9


[ROCm/hip commit: 27072b8972]
Este cometimento está contido em:
Rahul Garg
2016-12-06 16:55:17 +05:30
ascendente 55aa1d85d9
cometimento 61dffc7e18
+6 -1
Ver ficheiro
@@ -342,7 +342,12 @@ hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,hipDevice_t device)
HIP_INIT_API(pciBusId, len, device);
hipError_t e = hipSuccess;
int deviceId= device->_deviceId;
e = ihipDeviceGetAttribute((int*)pciBusId, hipDeviceAttributePciBusId, deviceId);
int tempPciBusId = 0;
e = ihipDeviceGetAttribute( tempPciBusId, hipDeviceAttributePciBusId, deviceId);
if( e == hipSuccess) {
std::string tempPciStr = std::to_string(tempPciBusId);
memcpy( pciBusId , tempPciStr.c_str() , tempPciStr.length() );
}
return ihipLogStatus(e);
}