Using CUDA mex files interoperably with gpuArray
古いコメントを表示
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 件のコメント
Matt J
2021 年 1 月 14 日
Edric Ellis
2021 年 1 月 15 日
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
2021 年 1 月 15 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で GPU Computing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!