Using CUDA mex files interoperably with gpuArray
Mostrar comentarios más antiguos
I have a 3rd party black box CUDA mex file. Every time I use it, it puts my GPU in a state such that gpuArray cannot subsequently use it. This is in R2020a, but I've observed similar problems in previous versions.
>> a=gpuArray(1)
Error using gpuArray
An unexpected error occurred during CUDA execution. The CUDA error was:
CUDA_ERROR_CONTEXT_IS_DESTROYED
The only remedy once this occurs is to restart Matlab. Is there any way gpuArray and my cuda mex can share use of the same GPU without nuclear devastation?
3 comentarios
Matt J
el 14 de En. de 2021
Edric Ellis
el 15 de En. de 2021
Unfortunately, I suspect there is not. It is definitely intended that you should be able to use CUDA MEX files together with gpuArray. If the CUDA MEX files are putting the GPU into a bad state, then reset(gpuDevice) is indeed the best option. You can use save to save gpuArray data to a file (providing you do this before the GPU is in a bad state).
Matt J
el 15 de En. de 2021
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre GPU Computing en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!