local changes for hipnccl
Change-Id: I05a1f0381ce2914a800f573342cc954eb5ff82d9
[ROCm/hip commit: eba2595611]
Этот коммит содержится в:
@@ -337,13 +337,21 @@ hipError_t hipDeviceGetName(char *name,int len,hipDevice_t device)
|
||||
return ihipLogStatus(e);
|
||||
}
|
||||
|
||||
hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,hipDevice_t device)
|
||||
// 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);
|
||||
// return ihipLogStatus(e);
|
||||
// }
|
||||
|
||||
hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,int device)
|
||||
{
|
||||
HIP_INIT_API(pciBusId, len, device);
|
||||
hipError_t e = hipSuccess;
|
||||
int deviceId= device->_deviceId;
|
||||
int tempPciBusId = 0;
|
||||
e = ihipDeviceGetAttribute( &tempPciBusId, hipDeviceAttributePciBusId, deviceId);
|
||||
e = ihipDeviceGetAttribute( &tempPciBusId, hipDeviceAttributePciBusId, device);
|
||||
if( e == hipSuccess) {
|
||||
std::string tempPciStr = std::to_string(tempPciBusId);
|
||||
memcpy( pciBusId , tempPciStr.c_str() , tempPciStr.length() );
|
||||
|
||||
Ссылка в новой задаче
Block a user