From cd7ad3d620c9d7afa15eb597bf1f1dbd7d32105b Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Thu, 10 Nov 2016 11:35:40 +0530 Subject: [PATCH] hipDeviceGetByPCIBusId support for HIP/NVCC Change-Id: I8f82890e88d2a15f592bff192179e7d5c5362722 [ROCm/clr commit: f86c7b5b3ce495187e80fc9e45a73d7919d3a291] --- .../clr/hipamd/include/hip/nvcc_detail/hip_runtime_api.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime_api.h b/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime_api.h index 0d73bae199..0d15dfcb01 100644 --- a/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime_api.h +++ b/projects/clr/hipamd/include/hip/nvcc_detail/hip_runtime_api.h @@ -764,6 +764,11 @@ inline static hipError_t hipDeviceGetPCIBusId(int *pciBusId,int len,hipDevice_t return hipCUResultTohipError(cuDeviceGetPCIBusId((char*)pciBusId,len,device)); } +inline static hipError_t hipDeviceGetByPCIBusId(int* device, const int *pciBusId) +{ + return hipCUDAErrorTohipError(cudaDeviceGetByPCIBusId(device,(char*)pciBusId)); +} + inline static hipError_t hipDeviceGetLimit(size_t *pValue, hipLimit_t limit) { return hipCUDAErrorTohipError(cudaDeviceGetLimit(pValue, limit));