I can run Theano using `device = gpu` in the configuration. It complains 
about not being able to find the new backend, but at this point I see no 
reason why to switch to the new backend.

On Monday, June 12, 2017 at 12:29:30 PM UTC-7, Daniel Seita wrote:
>
> I'm trying to follow the *simplest theano installation instructions I can 
> find*. I'm using Ubuntu 16.04 (along with other settings described in the 
> title) and the instructions seem to be here: 
> http://deeplearning.net/software/theano/install_ubuntu.html# for Theano 
> 0.9.
>
> I'm using Anaconda for Python 2.7.
>
> Running
>
> conda install numpy scipy mkl nose sphinx pydot-ng
>
> works without issues. 
>
> Then the instructions say to get the GPU and CUDA set up. I've installed 
> my CUDA drivers and they should be working, since I'm able to run 
> TensorFlow. I set up these in the bashrc:
>
> export PATH="/usr/local/cuda-8.0/bin:$PATH"
> export CUDA_HOME=/usr/local/cuda-8.0
> export LD_LIBRARY_PATH=/usr/local/lib
> export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64
>
> Finally, I ran
>
> conda install theano pygpu
>
> I was hoping this is it,  because that automatically installs the GPU 
> backend.  In addition, pygpu seems to be working (I deleted the long line 
> of periods):
>
> In [1]: import pygpu
>
> In [2]: pygpu.test()
> pygpu is installed in /home/daniel/anaconda2/lib/python2.7/site-packages/
> pygpu
> NumPy version 1.12.1
> NumPy relaxed strides checking option: True
> NumPy is installed in /home/daniel/anaconda2/lib/python2.7/site-packages/
> numpy
> Python version 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23
> :09:15) [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)]
> nose version 1.3.7
> *** Testing for TITAN X (Pascal)
> ----------------------------------------------------------------------
> Ran 7051 tests in 138.494s
>
> OK
>
> I have this in my theanorc:
>
> [global]
> floatX = float64
> device = cuda0
>
> [cuda]
> root = /usr/local/cuda-8.0
>
> Now let's see what happens:
>
> $ ipython
> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15) 
> Type "copyright", "credits" or "license" for more information.
>
> IPython 5.3.0 -- An enhanced Interactive Python.
> ?         -> Introduction and overview of IPython's features.
> %quickref -> Quick reference.
> help      -> Python's own help system.
> object?   -> Details about 'object', use 'object??' for extra details.
>
> In [1]: import theano
> ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
> Traceback (most recent call last):
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 164, in <module>
>     use(config.device)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 151, in use
>     init_dev(device)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/__init__.py"
> , line 68, in init_dev
>     context.cudnn_handle = dnn._make_handle(context)
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
> , line 80, in _make_handle
>     cudnn = _dnn_lib()
>   File 
> "/home/daniel/anaconda2/lib/python2.7/site-packages/theano/gpuarray/dnn.py"
> , line 67, in _dnn_lib
>     raise RuntimeError('Could not find cudnn library (looked for v5[.1])')
> RuntimeError: Could not find cudnn library (looked for v5[.1])
>
> I cannot even import theano successfully. There are two problems. The 
> first is that pygpu isn't initialized (?) and the second is that the cudnn 
> library couldn't be found. It was working for TensorFlow and the cudnn 
> header is found in `/usr/local/cuda-8.0/lib64/cudnn.h` so I'm guessing the 
> issue lies with the pygpu library. I have no idea how to fix this but there 
> must be a common fix since this seems to be the default way to install 
> theano?
>
> Another thread (
> https://groups.google.com/forum/#!topic/theano-users/zzaJVrYBD1k) has a 
> similar question but `sudo ldconfig` did not work for me and results in the 
> same errors.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"theano-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to