diff --git a/hipamd/include/hip/hcc_detail/hip_runtime_api.h b/hipamd/include/hip/hcc_detail/hip_runtime_api.h index ee703c4eec..688cfe9437 100644 --- a/hipamd/include/hip/hcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/hcc_detail/hip_runtime_api.h @@ -1597,7 +1597,7 @@ hipError_t hipDeviceGetName(char *name,int len,hipDevice_t device); * * @returns #hipSuccess, #hipErrorInavlidDevice */ -hipError_t hipDeviceGetPCIBusId (int *pciBusId,int len,hipDevice_t device); +hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,hipDevice_t device); /** * @brief Returns a handle to a compute device. diff --git a/hipamd/include/hip/nvcc_detail/hip_runtime_api.h b/hipamd/include/hip/nvcc_detail/hip_runtime_api.h index 625448094b..b304218883 100644 --- a/hipamd/include/hip/nvcc_detail/hip_runtime_api.h +++ b/hipamd/include/hip/nvcc_detail/hip_runtime_api.h @@ -765,7 +765,7 @@ inline static hipError_t hipDeviceGetName(char *name,int len,hipDevice_t device) return hipCUResultTohipError(cuDeviceGetName(name,len,device)); } -inline static hipError_t hipDeviceGetPCIBusId(int *pciBusId,int len,hipDevice_t device) +inline static hipError_t hipDeviceGetPCIBusId(char* pciBusId,int len,hipDevice_t device) { return hipCUResultTohipError(cuDeviceGetPCIBusId((char*)pciBusId,len,device)); } diff --git a/hipamd/src/hip_device.cpp b/hipamd/src/hip_device.cpp index 4f5729791e..1275c8f19b 100644 --- a/hipamd/src/hip_device.cpp +++ b/hipamd/src/hip_device.cpp @@ -306,7 +306,7 @@ hipError_t hipSetDeviceFlags( unsigned int flags) } } - unsigned supportedFlags = hipDeviceScheduleMask | hipDeviceMapHost | hipDeviceLmemResizeToMax; + unsigned supportedFlags = hipDeviceScheduleMask | hipDeviceMapHost | hipDeviceLmemResizeToMax; if (flags & (~supportedFlags)) { e = hipErrorInvalidValue; @@ -338,12 +338,12 @@ hipError_t hipDeviceGetName(char *name,int len,hipDevice_t device) return ihipLogStatus(e); } -hipError_t hipDeviceGetPCIBusId (int *pciBusId,int len,hipDevice_t device) +hipError_t hipDeviceGetPCIBusId (char *pciBusId,int len,hipDevice_t device) { - HIP_INIT_API(pciBusId,len, device); + HIP_INIT_API(pciBusId, len, device); hipError_t e = hipSuccess; int deviceId= device->_deviceId; - e = ihipDeviceGetAttribute(pciBusId, hipDeviceAttributePciBusId, deviceId); + e = ihipDeviceGetAttribute((int*)pciBusId, hipDeviceAttributePciBusId, deviceId); return ihipLogStatus(e); }