Trouble with python import of keras/Theano CUDA

Hello folks,

I have a GTX 1070 card and have installed CUDA, Theano and Keras. However, when within python 2.7 when I import keras it says:

import keras
Using Theano backend
Using gpu device 0: GeForce GTX 1070 (CNMem is enabled with initial size 95.0% of memory, cuDNN 5005)

Then I immediately get a source listing from an attempted nvcc compilation with 620 numbered source statements and then

nvcc fatal : Value ‘sm_61’ is not defined for option ‘gpu-architecture’

followed by a detailed nvcc command with tons of options and compiler settings, followed by a python traceback - approx 40 lines or so.

Finally:
Exception: (‘The following error happened while compiling the node’,
GpuCAReduce{add} {1} {<CudaNdarrayType(float32, vector)>), ‘\n’, ‘nvcc return status’ 1, ‘for cond’, 'nvcc -shaerd -O3 -use_fast_math … yada, yada, yada

I would appreciate any help available. I’m not sure why an import of keras results in a compilation attempt. I would have thought that with Cuda installed and Theanos also installed, that Keras would have just verified their work and thence used API calls. Compilation???

Thanks,

Arthur Sera

Which CUDA version did you install?

I installed CUDA 7.5. The Theano version was 0.8.2. I get the same error when I just import theano so I do not believe this is a keras problem. Perhaps Theanos 0.8.2 was never intended to work with the new Nvidia Pascal GPU found in the GTX 1080 and in my GTX 1070.

CUDA 7.5 doesn’t understand this:

nvcc fatal : Value 'sm_61' is not defined for option 'gpu-architecture'

which is being spit out by Theano/Keras.

I suggest you try to get things working with CUDA 8.0RC, which is the recommended CUDA toolkit version for the pascal family of GPUs.

I downloaded the new CUDA 8 and now everything seems to work. No more compiler source displays and compiler error message regarding gpu-architecture.

I truly appreciate your rapid and accurate recommendation.

Thanks, you’re the best txbob!!!