配置
出现版本MATLAB R2018a + NVIDIA RTX2080Ti + 驱动440.82 + CUDA10.2 + cudnn7.6.5
报错
报Warning如下:
Warning: The CUDA driver must recompile the GPU librariesbecause your device is more recent than the libraries. Recompiling can take several minutes. Learn more.
通常还会附带Error如下:
Error using *
或者
Error using .*
或者
Error using gpuArray/hTimesTranspose
等,最后出现
Call to dgemm in CUBLAS failed with error status : CUBLAS_STATUS_EXECUTION_FAILED.
解决
在你打开MATLAB的路径下新建startup.m文件,写入内容如下并保存:
warning off parallel:gpu:device:DeviceLibsNeedsRecompiling
try
gpuArray.eye(2)^2;
catch ME
end
try
nnet.internal.cnngpu.reluForward(1);
catch ME
end
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
退出并重新打开MATLAB,此时仍有可能出现Warning如下:
Warning: The CUDA driver must recompile the GPU librariesbecause your device is more recent than the libraries. Recompiling can take several minutes. Learn more.
> In startup (line 3)
忽略此Warning,因为程序已经可以正常执行。
参考
1、https://www.mathworks.com/matlabcentral/answers/437756-how-can-i-recompile-the-gpu-libraries
2、https://itectec.com/matlab/matlab-how-to-recompile-the-gpu-libraries/