Using CUDA mex files interoperably with gpuArray
Ältere Kommentare anzeigen
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 Kommentare
Matt J
am 14 Jan. 2021
Edric Ellis
am 15 Jan. 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
am 15 Jan. 2021
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu GPU Computing finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!