added limit api support for nvcc

Change-Id: Ib6c939e44343158a70e0de7f107d21afc0d0efba
Этот коммит содержится в:
Aditya Atluri
2016-10-12 21:06:30 -05:00
родитель 44cc44011b
Коммит 71b98fef5e
+9 -2
Просмотреть файл
@@ -72,6 +72,7 @@ typedef cudaEvent_t hipEvent_t;
typedef cudaStream_t hipStream_t;
typedef cudaIpcEventHandle_t hipIpcEventHandle_t;
typedef cudaIpcMemHandle_t hipIpcMemHandle_t;
typedef cudaLimit hipLimit_t;
typedef CUcontext hipCtx_t;
typedef CUsharedconfig hipSharedMemConfig;
typedef CUfunc_cache hipFuncCache;
@@ -101,6 +102,7 @@ switch(cuError) {
case cudaErrorPeerAccessAlreadyEnabled : return hipErrorPeerAccessAlreadyEnabled ;
case cudaErrorHostMemoryAlreadyRegistered : return hipErrorHostMemoryAlreadyRegistered ;
case cudaErrorHostMemoryNotRegistered : return hipErrorHostMemoryNotRegistered ;
case cudaErrorUnsupportedLimit : return hipErrorUnsupportedLimit ;
default : return hipErrorUnknown; // Note - translated error.
};
}
@@ -730,12 +732,17 @@ 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(int *pciBusId,int len,hipDevice_t device)
{
return hipCUResultTohipError(cuDeviceGetPCIBusId((char*)pciBusId,len,device));
}
inline static hipError_t hipDeviceTotalMem (size_t *bytes,hipDevice_t device)
inline static hipError_t hipDeviceGetLimit(size_t *pValue, hipLimit_t limit)
{
return hipCUDAErrorTohipError(cudaDeviceGetLimit(pValue, limit);
}
inline static hipError_t hipDeviceTotalMem(size_t *bytes,hipDevice_t device)
{
return hipCUResultTohipError(cuDeviceTotalMem(bytes,device));
}