【发布时间】:2016-05-18 21:19:10
【问题描述】:
我没有启用CUDA 的 Nvidia GPU,我想强制 MATLAB 在 CPU 而不是 GPU 上运行代码(是的,我知道,它会非常非常慢)。我该怎么做?
例如,让我们尝试在没有 CUDA 的 PC 上运行 this code。这是MATLAB给出的错误:
There is a problem with the CUDA driver or with this GPU device. Be sure that you have a supported GPU and that the latest driver is installed.
Error in nnet.internal.cnn.SeriesNetwork/activations (line 48)
output = gpuArray(data);
Error in SeriesNetwork/activations (line 269)
YChannelFormat = predictNetwork.activations(X, layerID);
Error in DeepLearningImageClassificationExample (line 262)
trainingFeatures = activations(convnet, trainingSet, featureLayer, ...
Caused by:
The CUDA driver could not be loaded. The library name used was 'nvcuda.dll'. The error was:
The specified module could not be found.
【问题讨论】:
-
AFAIK,在您完成转换
output = gpuArray(data)之后,操纵output的操作将在GPU 上完成。所以我首先要删除转换,即用output=data;替换它,然后看看程序的行为。 -
在函数定义 "keyboard" 之后创建第一行,这将暂停函数执行并让您可以访问键盘,现在逐行运行每一行,这样您就可以看到哪些有效,哪些有效失败。但是,我也怀疑 mkfin 评论是您正在寻找的。或者按照 Ben Voigt 的建议使用 CUDA 模拟器。
-
tnx @BenVoigt 获取链接。现在的问题是哪种方法适用于 Matlab?
-
@PeterMortensen 请不要将控制台输出放入引号标签中,它不是等宽的并且会破坏格式。
标签: matlab compilation deep-learning