簡體   English   中英

Tensorflow 1.13.1無法識別GPU

[英]Tensorflow 1.13.1 doesn't recognize GPU

我安裝了GPU NVIDIA GeForce GT 740M(計算能力3.0)以及以下版本的CUDA,cuDNN和tensorflow。

nvcc -V

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Fri_Feb__8_19:08:17_PST_2019
Cuda compilation tools, release 10.1, V10.1.105

貓/usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

#define CUDNN_MAJOR 7
#define CUDNN_MINOR 5
#define CUDNN_PATCHLEVEL 0
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)

#include "driver_types.h"

pip3 show tensorflow-gpu

Name: tensorflow-gpu
Version: 1.13.1
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /home/lightning/.local/lib/python3.6/site-packages
Requires: grpcio, tensorboard, absl-py, termcolor, protobuf, astor, gast, numpy, tensorflow-estimator, wheel, keras-preprocessing, keras-applications, six

pip3顯示tensorflow

Name: tensorflow
Version: 1.13.1
Summary: TensorFlow is an open source machine learning framework for everyone.
Home-page: https://www.tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /home/lightning/.local/lib/python3.6/site-packages
Requires: wheel, keras-preprocessing, numpy, astor, six, protobuf, tensorflow-estimator, termcolor, grpcio, keras-applications, absl-py, tensorboard, gast

但是當我使用print(device_lib.list_local_devices())檢查tensorflow檢測到的設備時,輸出如下...

[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 13567978771733496471
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 12191851301991039336
physical_device_desc: "device: XLA_CPU device"
]

我怎樣才能使Tensorflow看到GPU?

ps tensorflow-gpu是在tensorflow之前安裝的,因此按“ 1)tensorflow-gpu 2)tensorflow”的順序重新安裝效率很低

張量流需要計算能力+3.2。

您有一個具有計算能力3.0的GPU

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM