2017-03-28 2 views
3

Ich konfiguriert Tensorflow mit CUDA-Unterstützung auf meiner GPU (GeForce 840M) zu arbeiten, aber die Programme laufen ziemlich langsam im Vergleich zu dem, was meine CPU früher verwendet. Auch ich nicht bekomme jede Art von Nachricht, die die so und so CUDA-Bibliothek wurde erfolgreich geöffnet, wenn ich das Programm ausführen. Stattdessen ist es das, was ich in logs, wenn ich jedes tensorflow Programm ausführen:Tensorflow nicht angezeigt "Erfolgreich geöffnet und so CUDA Bibliotheken lokal"

python Neuralnet.py 
Successfully downloaded train-images-idx3-ubyte.gz 9912422 bytes. 
Extracting /tmp/data/train-images-idx3-ubyte.gz 
Successfully downloaded train-labels-idx1-ubyte.gz 28881 bytes. 
Extracting /tmp/data/train-labels-idx1-ubyte.gz 
Successfully downloaded t10k-images-idx3-ubyte.gz 1648877 bytes. 
Extracting /tmp/data/t10k-images-idx3-ubyte.gz 
Successfully downloaded t10k-labels-idx1-ubyte.gz 4542 bytes. 
Extracting /tmp/data/t10k-labels-idx1-ubyte.gz 
2017-03-28 07:53:57.979382: 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-03-28 07:53:57.979413: 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-03-28 07:53:57.979431: 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-03-28 07:53:57.979438: 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-03-28 07:53:57.979447: 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-03-28 07:53:58.233876: 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-03-28 07:53:58.234333: I tensorflow/core/common_runtime/gpu/gpu_device.cc:887] 
Found device 0 with properties: 
name: GeForce 840M 
major: 5 minor: 0 memoryClockRate (GHz) 1.124 
pciBusID 0000:08:00.0 
Total memory: 1.96GiB 
Free memory: 1.75GiB 
2017-03-28 07:53:58.234362: I tensorflow/core/common_runtime/gpu/gpu_device.cc:908] DMA: 0 
2017-03-28 07:53:58.234372: I tensorflow/core/common_runtime/gpu/gpu_device.cc:918] 0: Y 
2017-03-28 07:53:58.234388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:977] 
Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce 840M, pci bus id: 0000:08:00.0) 
('Epoch', 0, 'completed out of', 15, 'loss:', 115374329.04653475) 

Und so auf dem Programm gestartet runnning aber es hat nicht schneller lief nach meinen Erwartungen. Ich habe CUDA aus der offiziellen Dokumentation installiert, aber ich habe den Git-Master-Kopf nicht zurückgesetzt, da es Probleme verursachte, und ich verwendete die gleichen Optimierungs-Flags, die beim Bauen durch Bazel bazel build -c opt --config=cuda //tensorflow/tools/pip_package:build_pip_package bereitgestellt wurden.

+0

Warum zur Hölle ist das downvoted ??? Bieten Sie einen Rat oder fragen Sie nach weiteren Details !! –

Antwort

0

Haben Sie mit nvidia-smi festgestellt, ob Sie die richtigen cuda-Treiber installiert haben und Ihre GPU für das System sichtbar ist?

In TF können Sie die log_device_placement Option zu verstehen, wenn der GPU irgendwelche Ops zugewiesen sind.

+0

Ich habe es von den GitHub Issues Trackern gemacht, danke. Die NVIDIA-Dokumentation ist unvollständig und irreführend. –

Verwandte Themen