3

I have Theano working fine on Windows 10 without GPU support. I have a new GTX 1080 and want to get Theano running on it. This requires the latest CUDA 8.0 Toolkit from NVIDIA. I have installed everything according to http://deeplearning.net/software/theano/install_windows.html allowing for some minor software version differences. Whenever I try to simply 'import theano' with GPU support enabled via .theanorc.txt I get compilation errors.

Cuda 8.0 can work fine with Theano-master according to this thread: https://github.com/Theano/Theano/issues/4558

Running WinPython 64bit 2.7.10.3, scipy 0.161, numpy 1.9.3, Microsoft Visual Studio 12.0 and theano-master from June 16.

Latest attempt results in this list of errors:

===============================
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)>)]')

Please help!

talonmies
  • 70,661
  • 34
  • 192
  • 269
CowboyShow
  • 39
  • 3

1 Answers1

0

CUDA 8 RC and Visual Studio 2015 Update 2 (VC12) and greater do not blend. You'll have to wait until NVidia gets it together and releases an update OR uninstall VC12 and install VC11. You should be good to go.