reset(gpuDevice) does not work
显示 更早的评论
When I run the following code for values of n<5000 it runs just fine.
reset(gpuDevice);
n=5000;
a=gpuArray(rand(n));
b=gpuArray(rand(n));
tic
t=a'*a;
c=t\(a*b');
toc
But when I run it for n=5000 i get the error "Error using \ Call to Double LU on GPU failed with error status: unspecified launch failure."
If I try running the program again for any small value of n I get the error
"Error using parallel.gpu.CUDADevice/reset
An unexpected error pccured during CUDA execution. The CUDA error was " all CUDA -capable devices are busy or unavailable"
Also, if I execute the following command
g=gpuDevice;
disp(g.FreeMemory)
I get the answer to be NAN
I am unable to run the reset(gpuDevice) command. It gives the same error as above.
2 个评论
Walter Roberson
2016-8-18
Which MATLAB version are you using, and which operating system, and which GPU are you using? Also which gpu driver version do you have installed?
arnold
2016-8-20
Hi,
I was just now looking for this error, I have a similar problem on a machine at work. I tried using
class(a)
ans =
gpuArray
b = medfilt2(a,[9,9]);
Error using medfilt2gpumex
Failure in GPU implementation.
unspecified launch failure.
Error in gpuArray/medfilt2 (line 37)
b = medfilt2gpumex(varargin{:});
Filter sizes [7,7] and smaller work but 9 upwards gives this error. After that, the gpuDevice also shows
availableMemory: NaN
From this I can't use the GPU anymore without restarting Matlab. This is too bad since the GPU is 20 times faster doing this kind of calculations.
Setup:
- Matlab 2016a
- Windows 10 Pro 64 (all updates)
- Intel 5960X
- 64GB RAM
- GTX1080 with 372.54 (newest driver).
采纳的回答
更多回答(4 个)
Yahya Zakaria mohamed
2017-6-29
0 个投票
Thank You. I faced the same problem, I disconnected the second monitor and no error appeared.
Ricardo de Azevedo
2019-11-19
编辑:Ricardo de Azevedo
2019-11-21
I am facing the same problem now training an RNN and have tried both the TdrDelay to longer and the TdrLevel to 0.
Error:
Error using gpuArray/gatherAn unexpected error occurred during CUDA execution. The CUDA error was:CUDA_ERROR_LAUNCH_FAILED
The weird thing is the network trains for a while and then crashes, I can't really tell what triggers it.
(Using Matlab 2019b and latest NVIDIA drivers 441.20 for GTX 1080 Ti)
3 个评论
giorgio toscana
2020-4-6
Hi,
I have the same issue of yours.
Did you solve it ?
Thanks
Ricardo de Azevedo
2020-4-6
I desisted as I had other things to do and couldn't follow up.
Mathworks Support Sent me this:
After conferring with colleagues in development, there are a few steps we can take to narrow down the issue.
- If you are able to get a minimum set of data and code that reproduces the issue, that would be the easiest way to see what is causing this error.
- Try reducing the 'MiniBatchSize' all the way down to 1 to see if the issue still occurs
- Find out where the error actually occurred. One easy way to do this is to run with profiling switched on by calling the following command before running the script:
>> profile on
This should cause the CUDA error to be thrown after the line of code where the issue occurred.
giorgio toscana
2020-4-7
Hi Ricardo,
I will try them.
If the problem persists i'll contact the support with those info.
Thank you very much for your quick reply.
D.W. Moyar
2022-1-12
0 个投票
I have encountered a scenario where resetting the GPU device clearly does not work, leading to GPU out of memory errors. I was training LSTM networks in a loop. Each loop trained a new LSTM with different features. Every time I ran the program, the loop would run without incident for 20 iterations and then produce a GPU out of memory error. I tried resetting the GPU between loop iterations, deleting the training and target data variables between iterations, and pausing after the GPU reset. None of these efforts worked. The only way I was able to get the loop to run was to save all the variables every 15 iterations, clear the entire workspace, and reload the variables. Perhaps this issue is hardware related? I have a GeForce 1080 Ti graphics card.
hewayda hew
2023-1-14
编辑:hewayda hew
2023-1-14
0 个投票
I have the same problem
Error using gpuArray/gather
Encountered unexpected error during CUDA execution. The CUDA error was:
CUDA_ERROR_LAUNCH_TIMEOUT.
what is the proper solution?
类别
在 帮助中心 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!