我让Theano在Windows 10上运行良好没有 GPU支持。我有一个新的GTX 1080,并希望让Theano在其上运行。这需要NVIDIA最新的CUDA 8.0工具包。我根据http://deeplearning.net/software/theano/install_windows.html安装了所有内容,允许一些小的软件版本差异。每当我尝试简单地导入theano'通过.theanorc.txt启用GPU支持我得到编译错误。
根据这个帖子,Cuda 8.0可以与Theano-master一起使用:https://github.com/Theano/Theano/issues/4558
从6月16日开始运行WinPython 64bit 2.7.10.3,scipy 0.161,numpy 1.9.3,Microsoft Visual Studio 12.0和theano-master。
最新尝试导致此错误列表:
===============================
C:/Users/CHARLE~1/AppData/Local/Temp/tmpxft_00001148_00000000-10_mod.cpp1.ii(1): error: this declaration has no storage class or type specifier
C:/Users/CHARLE~1/AppData/Local/Temp/tmpxft_00001148_00000000-10_mod.cpp1.ii(1): error: identifier "R" is undefined
C:/Users/CHARLE~1/AppData/Local/Temp/tmpxft_00001148_00000000-10_mod.cpp1.ii(1): error: expected a ";"
At end of source: warning: parsing restarts here after previous syntax error
3 errors detected in the compilation of "C:/Users/CHARLE~1/AppData/Local/Temp/tmpxft_00001148_00000000-10_mod.cpp1.ii".
mod.cu
['nvcc', '-shared', '-O3', '-arch=sm_61', '--compiler-bindir', 'C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\lc.exe', '-Xlinker', '/DEBUG', '-D HAVE_ROUND', '-m64', '-Xcompiler', '-DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD', '-IC:\\Users\\Charles Gillespie\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_63_Stepping_2_GenuineIntel-2.7.10-64\\cuda_ndarray', '-IC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\include', '-IC:\\scisoft\\WinPython-64bit-2.7.10.3\\python-2.7.10.amd64\\lib\\site-packages\\numpy\\core\\include', '-IC:\\scisoft\\WinPython-64bit-2.7.10.3\\python-2.7.10.amd64\\include', '-Ic:\\scisoft\\winpython-64bit-2.7.10.3\\python-2.7.10.amd64\\theano\\theano\\gof', '-Ic:\\scisoft\\winpython-64bit-2.7.10.3\\python-2.7.10.amd64\\theano\\theano\\sandbox\\cuda', '-o', 'C:\\Users\\Charles Gillespie\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_63_Stepping_2_GenuineIntel-2.7.10-64\\tmp6qa5py\\4894639462a290346189bb38dab7bb7e.pyd', 'mod.cu', '-LC:\\Users\\Charles Gillespie\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_63_Stepping_2_GenuineIntel-2.7.10-64\\cuda_ndarray', '-LC:\\scisoft\\WinPython-64bit-2.7.10.3\\python-2.7.10.amd64\\libs', '-LC:\\scisoft\\WinPython-64bit-2.7.10.3\\python-2.7.10.amd64', '-lcudart', '-lcublas', '-lcuda_ndarray', '-lpython27']
Traceback (most recent call last):
File "test-theano.py", line 3, in <module>
import theano
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\__init__.py", line 118, in <module>
theano.sandbox.cuda.tests.test_driver.test_nvidia_driver1()
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\sandbox\cuda\tests\test_driver.py", line 32, in test_nvidia_driver1
profile=False)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\compile\function.py", line 322, in function
output_keys=output_keys)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\compile\pfunc.py", line 480, in pfunc
output_keys=output_keys)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\compile\function_module.py", line 1784, in orig_function
defaults)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\compile\function_module.py", line 1648, in create
input_storage=input_storage_lists, storage_map=storage_map)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\link.py", line 693, in make_thunk
storage_map=storage_map)[:3]
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\vm.py", line 1034, in make_all
no_recycling))
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\sandbox\cuda\__init__.py", line 256, in make_thunk
compute_map, no_recycling)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\op.py", line 969, in make_thunk
no_recycling)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\op.py", line 872, in make_c_thunk
output_storage=node_output_storage)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\cc.py", line 1200, in make_thunk
keep_lock=keep_lock)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\cc.py", line 1143, in __compile__
keep_lock=keep_lock)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\cc.py", line 1591, in cthunk_factory
key=key, lnk=self, keep_lock=keep_lock)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\cmodule.py", line 1145, in module_from_key
module = lnk.compile_cmodule(location)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\gof\cc.py", line 1502, in compile_cmodule
preargs=preargs)
File "c:\scisoft\winpython-64bit-2.7.10.3\python-2.7.10.amd64\theano\theano\sandbox\cuda\nvcc_compiler.py", line 403, in compile_str
'for cmd', ' '.join(cmd))
Exception: ('The following error happened while compiling the node', GpuCAReduce{add}{1}(<CudaNdarrayType(float32, vector)>), '\n', 'nvcc return status', 2, 'for cmd', 'nvcc -shared -O3 -arch=sm_61 --compiler-bindir C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\bin\\lc.exe -Xlinker /DEBUG -D HAVE_ROUND -m64 -Xcompiler -DCUDA_NDARRAY_CUH=c72d035fdf91890f3b36710688069b2e,-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION,/Zi,/MD -IC:\\Users\\Charles Gillespie\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_63_Stepping_2_GenuineIntel-2.7.10-64\\cuda_ndarray -IC:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v8.0\\include -IC:\\scisoft\\WinPython-64bit-2.7.10.3\\python-2.7.10.amd64\\lib\\site-packages\\numpy\\core\\include -IC:\\scisoft\\WinPython-64bit-2.7.10.3\\python-2.7.10.amd64\\include -Ic:\\scisoft\\winpython-64bit-2.7.10.3\\python-2.7.10.amd64\\theano\\theano\\gof -Ic:\\scisoft\\winpython-64bit-2.7.10.3\\python-2.7.10.amd64\\theano\\theano\\sandbox\\cuda -o C:\\Users\\Charles Gillespie\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_63_Stepping_2_GenuineIntel-2.7.10-64\\tmp6qa5py\\4894639462a290346189bb38dab7bb7e.pyd mod.cu -LC:\\Users\\Charles Gillespie\\AppData\\Local\\Theano\\compiledir_Windows-8-6.2.9200-Intel64_Family_6_Model_63_Stepping_2_GenuineIntel-2.7.10-64\\cuda_ndarray -LC:\\scisoft\\WinPython-64bit-2.7.10.3\\python-2.7.10.amd64\\libs -LC:\\scisoft\\WinPython-64bit-2.7.10.3\\python-2.7.10.amd64 -lcudart -lcublas -lcuda_ndarray -lpython27', '[GpuCAReduce{add}{1}(<CudaNdarrayType(float32, vector)>)]')
请帮忙!
答案 0 :(得分:0)
CUDA 8 RC和Visual Studio 2015 Update 2(VC12)及更高版本不混合。您必须等到NVidia将它组合在一起并发布更新或卸载VC12并安装VC11。你应该好好去。