On Friday, June 30, 2017 at 9:50:58 PM UTC-4, Daniel Seita wrote:
>
> your plan worked!
>

Nice to hear that :)
 

> Pascal and nouiz, just one last thing, this GPU backend is the first time 
> that Theano can run float64 with the GPU, right? I'm hoping to take 
> existing code which uses float64 only and running it on the GPU. (That's 
> why I've been using the CPU recently, to use float64.)
>

Yes, indeed.
Note that float64 performance can be much slower than float32, depending on 
the GPU. For instance, on a Titan X (Pascal), it would be 32x slower than 
float32, K40 and K80 should be only 3x slower, and P100 / GP100 2x slower.
 

>
>
>
> On Friday, June 30, 2017 at 6:48:08 PM UTC-7, Daniel Seita wrote:
>>
>> 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 <takesh...@gmail.com> 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 t
>>>>>>
>>>>>

-- 

--- 
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 theano-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to