Hi nouiz and Pascal, thanks for the responses. I've been busy using the CPU
version of Theano in the meantime, so sorry for the delay in responding.
nouiz:
I actually had my `cudnn.h` file in both a `lib64` directory and an
`include` directory:
~$ ls -lh /usr/local/cuda-8.0/include/cudnn.h
-r--r--r-- 1 root root 98K Oct 17 2016 /usr/local/cuda-8.0/include/cudnn.h
~$ ls -lh /usr/local/cuda-8.0/lib64/cudnn.h
-r--r--r-- 1 root root 98K Oct 17 2016 /usr/local/cuda-8.0/lib64/cudnn.h
I must have copied them to both when I was installing it. Also, here is my
error message in full, assuming that my `~/.theanorc` file is
~$ cat ~/.theanorc
[global]
device = cuda
floatX = float64
[cuda]
root = /usr/local/cuda-8.0
~$ 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])
This happens if I also set the device to be `cuda0` instead of `cuda`, and
trying with `float32` instead of `float64`.
On Friday, June 30, 2017 at 5:43:35 PM UTC-7, Pascal Lamblin wrote:
>
> Something weird seems to be happening:
> - theano detects that cuDNN is available, in fact it called
> _dnn_check_compile() and _dnn_check_version() successfully
> - however, calling _dnn_lib() failed, which means ctypes did not manage to
> find the cudnn library.
>
> Is /usr/local/cuda-8.0/lib64 in your LIBRARY_PATH (in addition to
> LD_LIBRARY_PATH)?
>
> On Monday, June 19, 2017 at 6:16:37 PM UTC-4, nouiz wrote:
>>
>> Your cudnn.h file should not be in the lib64 directory, but in an include
>> directory. Tensorflow does none standard stuff related to import and cause
>> problem in other setup, but it seem to tolerate your non standard setup.
>> Theano does the standard setup.
>>
>> You can use the Theano flag dnn.include_path and dnn.library_path to tell
>> Theano where your cudnn.h and cudnn.so* files are.
>>
>> I did not see your last error in full.
>>
>> Le ven. 16 juin 2017 19:35, Daniel Seita <[email protected]
>> <javascript:>> a écrit :
>>
>>> Ack, sorry, half of my post got deleted! Hopefully you can still see it
>>> (i can find it by looking at the original post but it's in a really ugly
>>> format, sorry).
>>>
>>>
>>>
>>> On Friday, June 16, 2017 at 4:33:20 PM UTC-7, Daniel Seita wrote:
>>>
>>>> I was running into some more difficulties, so I gave up on getting this
>>>> to work and tried to uninstall and then reinstall Theano. Just to be extra
>>>> clear, here is my setup:
>>>>
>>>> - Ubuntu 16.04
>>>> - Cuda 8.0, stored in `usr/local/cuda-8.0`
>>>> - Titan X GPU with Pascal
>>>>
>>>> cuDNN is here:
>>>>
>>>> $ ls /usr/local/cuda-8.0/lib64/cudnn.h
>>>> /usr/local/cuda-8.0/lib64/cudnn.h
>>>>
>>>> To verify that I can use my GPU I started this quick TensorFlow
>>>> computation:
>>>>
>>>> In [1]: import tensorflow as tf
>>>>
>>>> In [2]: tf.__version__
>>>> Out[2]: '1.1.0'
>>>>
>>>> In [3]: tf.GPUOptions
>>>> Out[3]: tensorflow.core.protobuf.config_pb2.GPUOptions
>>>>
>>>> In [4]: with tf.device('/gpu:0'):
>>>> ...: a = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[2, 3
>>>> ], name='a')
>>>> ...: b = tf.constant([1.0, 2.0, 3.0, 4.0, 5.0, 6.0], shape=[3, 2
>>>> ], name='b')
>>>> ...: c = tf.matmul(a,b)
>>>> ...:
>>>>
>>>> In [5]: with tf.Session() as sess:
>>>> ...: print(sess.run(c))
>>>> ...:
>>>> 2017-06-16 16:10:54.402311: W tensorflow/core/platform/
>>>> cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use
>>>> SSE4.1 instructions, but these are available on your machine and could
>>>> speed up CPU computations.
>>>> 2017-06-16 16:10:54.402328: W
>>>> tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
>>>> wasn't compiled to use SSE4.2 instructions, but these are available on
>>>> your machine and could speed up CPU computations.
>>>> 2017-06-16 16:10:54.402346: W tensorflow/core/platform/
>>>> cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use
>>>> AVX instructions, but these are available on your machine and could speed
>>>> up CPU computations.
>>>> 2017-06-16 16:10:54.402350: W
>>>> tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library
>>>> wasn't compiled to use AVX2 instructions, but these are available on
>>>> your machine and could speed up CPU computations.
>>>> 2017-06-16 16:10:54.402356: W tensorflow/core/platform/
>>>> cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use
>>>> FMA instructions, but these are available on your machine and could speed
>>>> up CPU computations.
>>>> 2017-06-16 16:10:54.527167: I
>>>> tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:901] successful NUMA
>>>> node read from SysFS had negative value (-1), but there must be at least
>>>> one NUMA node, so returning NUMA node zero
>>>> 2017-06-16 16:10:54.527553: I
>>>> tensorflow/core/common_runtime/gpu/gpu_device.cc:887] Found device 0 with
>>>> properties:
>>>> name: TITAN X (Pascal)
>>>> major: 6 minor: 1 memoryClockRate (GHz) 1.531
>>>> pciBusID 0000:01:00.0
>>>> Total memory: 11.90GiB
>>>> Free memory: 11.38GiB
>>>> 2017-06-16 16:10:54.527565: I
>>>> tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0
>>>> 2017-06-16 16:10:54.527568: I
>>>> tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0: Y
>>>> 2017-06-16 16:10:54.527590: I
>>>> tensorflow/core/common_runtime/gpu/gpu_device.cc:977] Creating TensorFlow
>>>> device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id:
>>>> 0000:01:00.0)
>>>> [[ 22. 28.]
>>>> [ 49. 64.]]
>>>>
>>>>
>>>> This looks like it indicates a successful GPU and/or cuDNN installation.
>>>>
>>>> Great, now let's install the *development version* of Theano. The
>>>> instructions I'm following step-by-step:
>>>> http://deeplearning.net/software/theano_versions/dev/install_ubuntu.html
>>>>
>>>> The first step seems to be to install miniconda. I downloaded the bash
>>>> script for Python 2.7 and ran it:
>>>>
>>>> ~/Downloads$ bash Miniconda2-latest-Linux-x86_64.sh
>>>>
>>>> Welcome to Miniconda2 4.3.21 (by Continuum Analytics, Inc.)
>>>>
>>>> In order to continue the installation process, please review the
>>>> license
>>>> agreement.
>>>> Please, press ENTER to continue
>>>>
>>>> and it seemed to work without issues.
>>>>
>>>> The next step is to install requirements through conda. Here I did:
>>>>
>>>> $ conda install numpy scipy mkl nose sphinx pydot-ng
>>>> Fetching package metadata .........
>>>> Solving package specifications: .
>>>>
>>>> Package plan for installation in environment /home/daniel/miniconda2:
>>>>
>>>> The following NEW packages will be INSTALLED:
>>>>
>>>> alabaster: 0.7.10-py27_0
>>>> babel: 2.4.0-py27_0
>>>> docutils: 0.13.1-py27_0
>>>> imagesize: 0.7.1-py27_0
>>>> jinja2: 2.9.6-py27_0
>>>> libgfortran: 3.0.0-1
>>>> markupsafe: 0.23-py27_2
>>>> mkl: 2017.0.1-0
>>>> nose: 1.3.7-py27_1
>>>> numpy: 1.13.0-py27_0
>>>> pydot-ng: 1.0.0.15-py27_0
>>>> pygments: 2.2.0-py27_0
>>>> pytz: 2017.2-py27_0
>>>> scipy: 0.19.0-np113py27_0
>>>> snowballstemmer: 1.2.1-py27_0
>>>> sphinx: 1.6.2-py27_0
>>>> sphinxcontrib: 1.0-py27_0
>>>> sphinxcontrib-websupport: 1.0.1-py27_0
>>>> typing: 3.6.1-py27_0
>>>>
>>>> The following packages will be UPDATED:
>>>>
>>>> conda: 4.3.21-py27_0 --> 4.3.22-py27_0
>>>>
>>>> Proceed <span style="color: #660;" class="styled-by-prettify
>>>>
>>>> --
>>>
>>> ---
>>> 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] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
--
---
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.