added hipInit for cuInit nvcc path
Change-Id: I594d08d936ac5d06f16e42c63062ac5776b65a0c
[ROCm/hip commit: dfc60a8359]
Este cometimento está contido em:
@@ -148,6 +148,11 @@ default:
|
||||
}
|
||||
}
|
||||
|
||||
inline static hipError_t hipInit(unsigned int flags)
|
||||
{
|
||||
return hipCUResultTohipError(cuInit(flags));
|
||||
}
|
||||
|
||||
inline static hipError_t hipDeviceReset() {
|
||||
return hipCUDAErrorTohipError(cudaDeviceReset());
|
||||
}
|
||||
@@ -219,6 +224,12 @@ inline static hipError_t hipMemcpyDtoH(void* dst,
|
||||
return hipCUResultTohipError(cuMemcpyDtoH(dst, src, size));
|
||||
}
|
||||
|
||||
inline static hipError_t hipMemcpyDtoD(hipDeviceptr_t dst,
|
||||
hipDeviceptr_t src, size_t size)
|
||||
{
|
||||
return hipCUResultTohipError(cuMemcpyDtoD(dst, src, size));
|
||||
}
|
||||
|
||||
inline static hipError_t hipMemcpy(void* dst, const void* src, size_t sizeBytes, hipMemcpyKind copyKind) {
|
||||
return hipCUDAErrorTohipError(cudaMemcpy(dst, src, sizeBytes, hipMemcpyKindToCudaMemcpyKind(copyKind)));
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ int main(){
|
||||
|
||||
|
||||
#ifdef __HIP_PLATFORM_NVCC__
|
||||
cuInit(0);
|
||||
hipInit(0);
|
||||
hipDevice_t device;
|
||||
hipCtx_t context;
|
||||
hipDeviceGet(&device, 0);
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador