Ich habe die Anweisungen zur Installation von Theano ein GPUArray von der Quelle (Git-Versionen), in den Systemordnern (nicht als Benutzer). Die GPUArray-Tests laufen gut ohne Fehler.Probleme mit Theano-Installation mit CUDA bei Verwendung von Nicht-Root-Benutzer
Das Problem ist Theano funktioniert nur mit GPU, wenn ich als root laufen. Ausführen des example to test gpu:
(python35) [email protected]:~$ THEANO_FLAGS=device=cuda python temp.py
ERROR (theano.gpuarray): Could not initialize pygpu, support disabled
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/theano/gpuarray/__init__.py", line 179, in <module>
use(config.device)
File "/usr/local/lib/python3.5/dist-packages/theano/gpuarray/__init__.py", line 166, in use
init_dev(device, preallocate=preallocate)
File "/usr/local/lib/python3.5/dist-packages/theano/gpuarray/__init__.py", line 73, in init_dev
context.cudnn_handle = dnn._make_handle(context)
File "/usr/local/lib/python3.5/dist-packages/theano/gpuarray/dnn.py", line 83, in _make_handle
cudnn = _dnn_lib()
File "/usr/local/lib/python3.5/dist-packages/theano/gpuarray/dnn.py", line 70, in _dnn_lib
raise RuntimeError('Could not find cudnn library (looked for v5* or v6*)')
RuntimeError: Could not find cudnn library (looked for v5* or v6*)
[Elemwise{exp,no_inplace}(<TensorType(float64, vector)>)]
Looping 1000 times took 3.201078 seconds
Result is [ 1.23178032 1.61879341 1.52278065 ..., 2.20771815 2.29967753
1.62323285]
Used the cpu
Wenn als root ausführen es funktioniert, obwohl es immer noch ein Fehler in der Lage, im Zusammenhang ist zu cuDNN nicht vielleicht um die Geräte zu identifizieren:
(python35) [email protected]:~$ sudo THEANO_FLAGS=device=cuda python3 temp.py
Can not use cuDNN on context None: cannot compile with cuDNN. We got this error:
b'/tmp/try_flags_bg7m03hd.c:4:19: fatal error: cudnn.h: No such file or directory\ncompilation terminated.\n'
Mapped name None to device cuda: TITAN X (Pascal) (0000:01:00.0)
[GpuElemwise{exp,no_inplace}(<GpuArrayType<None>(float64, vector)>), HostFromGpu(gpuarray)(GpuElemwise{exp,no_inplace}.0)]
Looping 1000 times took 0.390976 seconds
Result is [ 1.23178032 1.61879341 1.52278065 ..., 2.20771815 2.29967753
1.62323285]
Used the gpu
Es gibt 2 Titan X auf diese Maschine. Funktioniert gut mit Tensorflow. Ich verwende nicht .theanorc Datei, aber ich habe beide gesetzt:
(python35) [email protected]:~$ echo $LD_LIBRARY_PATH
/usr/local/cuda-8.0/lib64
(python35) [email protected]:~$ echo $CUDA_ROOT
/usr/local/cuda-8.0/
Ich habe alles gemäß den Anweisungen, und trotz einiger Warnungen keine Fehler aufgetreten sind.
Ich glaube nicht, es ist eine Erlaubnis Fehler auf der Kompilierung dir .theano
, denn wenn ich die .theano
Dir das Verhalten ist das gleiche.
Wie kann ich das beheben?