Theano / libgpuarray

Library to manipulate tensors on the GPU.
Other
189 stars 96 forks source link

Error encountered when building with CMake on Win 10. #351

Closed cjliux closed 7 years ago

cjliux commented 7 years ago

The error message is as follow: CMake Error at CMakeLists.txt:85 (add_library): Cannot find source file:

../util/strb.c

Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx

CMake Error: CMake can not determine linker language for target: gpuarray CMake Error: CMake can not determine linker language for target: gpuarray-static

Does any one know why that happened?

cjliux commented 7 years ago

I am using Visual Studio Visual Studio 14 2015 Win64 as Generator, the only version of Visual Studio installed on my computer.The only change of entris is setting CMAKE_INSTALL_PREFIX=E:/ProgramData/Anaconda2/pkgs/libgpuarray/lib. This is queer.

abergeron commented 7 years ago

Try using the prebuilt conda pacakges with conda install -c rdonnelly pygpu.

cjliux commented 7 years ago

I tried that and it turned out not working. Here's the error message that I got: ERROR (theano.sandbox.gpuarray): Could not initialize pygpu, support disabled Traceback (most recent call last): File "E:\ProgramData\Anaconda2\lib\site-packages\theano\sandbox\gpuarray__init__.py", line 95, in init_dev(config.device) File "E:\ProgramData\Anaconda2\lib\site-packages\theano\sandbox\gpuarray__init__.py", line 46, in init_dev "Make sure Theano and libgpuarray/pygpu " RuntimeError: ('Wrong major API version for gpuarray:', 1, 'Make sure Theano and libgpuarray/pygpu are in sync.') The version of theano is 0.8.2, downloaded using pip install theano.And by the way, I am using CUDA8.0 and VS 2015. How can I solve the problem?

abergeron commented 7 years ago

If you want to use the new backend you should use the development version of Theano. There has been a mountain of fixes since then.

cjliux commented 7 years ago

Thank you very much! It's almost working now, but the Theano-0.9.0b1 seems unable to detect cuDNN 5.1 on windows 10. Every time I import theano in ipython, it prompts the following message even though cuDNN.h is actually present in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0\include: Can not use cuDNN on context None: cannot compile with cuDNN. We got this error: c:\users\asus\appdata\local\temp\try_flags__mo4tn.c:4:19: fatal error: cudnn.h: No such file or directory compilation terminated.

abergeron commented 7 years ago

You probably need to specify the dnn library and include paths with the Theano flags options dnn.include_path and dnn.library_path. Note that to make this work correctly you have to use the latest git master since there have been some fixes related to spaces in paths after 0.9.0beta1