当我运行导入theano时,错误如下:
['nvcc', '-shared', '-g', '-O3', '--compiler-bindir', 'C:\\Program Files(x86)\\Microsoft Visual Studio 10.0\\VC\\bin# flags=-m32 # we have this hard coded fornow', '-Xlinker', '/DEBUG', '-m32', '-Xcompiler', 'DCUDA_NDARRAY_CUH=d67f7c8a21306c67152a70a88a837011,/Zi,/MD', '-IC:\\TheanoPython\\python-2.7.6\\lib\\site-packages\\theano\\sandbox\\cuda', '-IC:\\TheanoPython\\python-2.7.6\\lib\\site-packages\\numpy\\core\\include', '-IC:\\TheanoPython\\python-2.7.6\\include', '-o',
'C:\\Users\\Matej\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.6-32\\cuda_ndarray\\cuda_ndarray.pyd', 'mod.cu', '-LC:\\TheanoPython\\python-2.7.6\\libs', '-LNone\\lib', '-LNone\\lib64', '-LC:\\TheanoPython\\python-2.7.6', '-lpython27', '-lcublas', '-lcudart']
ERROR (theano.sandbox.cuda): Failed to compile cuda_ndarray.cu: ('nvcc return status', 1, 'for cmd', 'nvcc -shared -g -O3 --compiler-bindir C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\bin# flags=-m32 # we have this hard codedfor now -Xlinker /DEBUG -m32 -Xcompiler DCUDA_NDARRAY_CUH=d67f7c8a21306c67152a70a88a837011,/Zi,/MD -IC:\\TheanoPython\\python-2.7.6\\lib\\site-packages\\theano\\sandbox\\cuda -IC:\\TheanoPython\\python-2.7.6\\lib\\site-packages\\numpy\\core\\include -IC:\\TheanoPython\\python-2.7.6\\include -o C:\\Users\\Matej\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_60_Stepping_3_GenuineIntel-2.7.6-32\\cuda_ndarray\\cuda_ndarray.pyd mod.cu -LC:\\TheanoPython\\python-2.7.6\\libs -LNone\\lib -LNone\\lib64 LC:\\TheanoPython\\python-2.7.6 -lpython27 -lcublas -lcudart')
WARNING (theano.sandbox.cuda): CUDA is installed, but device gpu is not available
我的.theanorc文件内容如下:
[blas]
ldflags =
[gcc]
cxxflags = -IC:\Anaconda\MinGW\bin
[cuda]
root = C:\cuda\cudatoolkit\bin
[nvcc]
fastmath = True
flags=-LC:\Anaconda\libs
compiler-bindir=C:\Microsoft Visual Studio 11.0\VC\bin
[global]
floatX = float32
device = gpu0
openmp = False
环境变量如下:
C:\Anaconda;C:\Anaconda\MinGW\bin;C:\Anaconda\MinGW\x86_64-w64-mingw32\lib;
C:\Microsoft Visual Studio 11.0\VC\bin;C:\Microsoft Visual Studio 11.0\VC\lib;
C:\Program Files(x86)\NVIDIACorporation\PhysX\Common;C:\cuda\cudatoolkit\bin;
如果我在没有GPU选项的情况下运行导入theano,它运行没有问题。此外,CUDA样本运行没有问题。我已经确认计算机GPU已经打开。 几个星期前,我没有遇到任何问题。由于软件,一切都是不工作的。现在这个问题让我很困惑......