Ich tensorflow 0.8.0 für python3 (pip Installation) ausgeführt wird, und die folgende Datei test.py
:Tensorflow nimmt> 1 min auf den ersten Lauf auf Grafikkarte mit 5.0 Rechenkapazität
import tensorflow as tf
a = tf.convert_to_tensor([1], dtype=tf.int32)
b = tf.to_float(a)
with tf.Session():
b.eval()
... nimmt mehr als eine Minute zu laufen:
$time python3 test.py
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally
I tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally
I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:900] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
I tensorflow/core/common_runtime/gpu/gpu_init.cc:102] Found device 0 with properties:
name: GeForce GTX 860M
major: 5 minor: 0 memoryClockRate (GHz) 1.0195
pciBusID 0000:01:00.0
Total memory: 4.00GiB
Free memory: 3.61GiB
I tensorflow/core/common_runtime/gpu/gpu_init.cc:126] DMA: 0
I tensorflow/core/common_runtime/gpu/gpu_init.cc:136] 0: Y
I tensorflow/core/common_runtime/gpu/gpu_device.cc:755] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 860M, pci bus id: 0000:01:00.0)
real 1m6.985s
user 1m6.700s
sys 0m1.480s
Ich sollte erwähnen, andere Tensorflow-Programme scheinen gut zu funktionieren, z
$time python3 -m tensorflow.models.image.mnist.convolutional
dauert unter 4 Minuten.
Edit:
$cat /usr/local/cuda/version.txt
CUDA Version 7.5.18
$ls /usr/local/cuda/lib64/libcudnn*
/usr/local/cuda/lib64/libcudnn.so /usr/local/cuda/lib64/libcudnn.so.4.0.7
/usr/local/cuda/lib64/libcudnn.so.4 /usr/local/cuda/lib64/libcudnn_static.a
Was passiert, wenn Sie die GPU mit 'export CUDA_VISIBLE_DEVICES =" "' deaktivieren? Ich habe einige Leute gesehen, die wegen "PTX-> SASS-Kompilierung" 6 Minuten warten, aber das sollte mit einem Upgrade auf CUDA 7.5 behoben worden sein. –
Das könnte eine schlechte Kombination aus Grafikkarte/Treiber/CUDA-Version/CuDNN-Version sein, wenn Sie reichen einen Fehler ein, bitte geben Sie diese Information ein –
Danke! Ich werde versuchen, tenorflow/cuda/cudnn neu zu installieren. Ich habe die Frage bearbeitet. – user6251554