简体   繁体   English

Tensorflow 2.3.0 CUDA 工具包版本 10.1 不使用 GPU

[英]Tensorflow 2.3.0 CUDA Toolkit version 10.1 does not use GPU

I had tensorflow 2.0 workig with my RTX2070 gpu.我有 tensorflow 2.0 与我的 RTX2070 gpu 一起工作。 I did a windows update so I could use tf-nightly.我做了一个 windows 更新,所以我可以使用 tf-nightly。 Did not like it so uninstalled it and reinstalled tensorflow 2.3.0.不喜欢它所以卸载它并重新安装 tensorflow 2.3.0。 Ran previous python code that ran fine with GPU previously but it did not use the GPU.运行之前使用 GPU 运行良好的 python 代码,但它没有使用 GPU。 Tried lots of stuff.尝试了很多东西。 Finally just started over.终于重新开始了。 Reinstalled Anaconda, created new environment.重新安装Anaconda,创建新环境。 Uninstalled Cuda toolkit 10.1 and reinstalled it.卸载 Cuda 工具包 10.1 并重新安装。 Installed cuDnn SDK 7.6 in directory c:\Tools.在目录 c:\Tools 中安装了 cuDnn SDK 7.6。 Checked path env variable to include检查要包含的路径环境变量

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\extras\CUPTI\lib64;
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include;
C:\tools\cuda\bin;%PATH%
       #then ran this code:
import tensorflow as tf
from tensorflow.python.client import device_lib
print(device_lib.list_local_devices())
print(tf.__version__)
print("Num GPUs Available: ", len(tf.config.experimental.list_physical_devices('GPU')))
tf.test.is_gpu_available()
     #I get the result
[name: "/device:CPU:0"
device_type: "CPU"
memory_limit: 268435456
locality {
}
incarnation: 15177607927005893519
, name: "/device:XLA_CPU:0"
device_type: "XLA_CPU"
memory_limit: 17179869184
locality {
}
incarnation: 4640072765546557805
physical_device_desc: "device: XLA_CPU device"
, name: "/device:XLA_GPU:0"
device_type: "XLA_GPU"
memory_limit: 17179869184
locality {
}
incarnation: 16675502319763286567
physical_device_desc: "device: XLA_GPU device"
]
2.3.0
Num GPUs Available:  0

False

tensorflow still does not use GPU. What an I missing? 

also same problem using python 3.7.0 and same problem using tensorflow 2.0.0


I found I can get tensorflow to recognize the GPU if in my working environment using conda I run conda install cudnn==7.6.4 which works with CUDA 10.1.0 resultant messages in anaconda prompt are: I found I can get tensorflow to recognize the GPU if in my working environment using conda I run conda install cudnn==7.6.4 which works with CUDA 10.1.0 resultant messages in anaconda prompt are:

Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\tfuser\anaconda3\envs\tf

  added / updated specs:
    - cudnn==7.6.4


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    cudnn-7.6.4                |       cuda10.1_0       179.3 MB
    ------------------------------------------------------------
                                           Total:       179.3 MB

The following NEW packages will be INSTALLED:

  cudatoolkit        pkgs/main/win-64::cudatoolkit-10.1.243-h74a9793_0
  cudnn              pkgs/main/win-64::cudnn-7.6.4-cuda10.1_0


Proceed ([y]/n)? y
The following packages will be downloaded:
 cudnn-7.6.4                |       cuda10.1_0       179.3 MB
The following NEW packages will be INSTALLED:

  cudatoolkit        pkgs/main/win-64::cudatoolkit-10.1.243-h74a9793_0
  cudnn              pkgs/main/win-64::cudnn-7.6.4-cuda10.1_0


Proceed ([y]/n)? y
Downloading and Extracting Packages
cudnn-7.6.4          | 179.3 MB  |
Preparing transaction: doneVerifying transaction: done
Executing transaction: done

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tensorflow 2.3.0 未检测到 GPU - Tensorflow 2.3.0 does not detect GPU 安装CUDA工具包和cuDNN后,Tensorflow无法识别GPU - Tensorflow does not recognize GPU after installing CUDA toolkit and cuDNN 导入 tensorflow 时,Windows10 上带有 rtx 2070 gpu 的 Cuda 10.1 不起作用 - Cuda 10.1 with rtx 2070 gpu on windows10 does not work when import tensorflow Tensorflow-2.3.0 未检测到 GPU - Tensorflow-2.3.0 does not detect GPU 已安装 CUDA 10.1 但 Tensorflow 不在 GPU 上运行模拟 - CUDA 10.1 installed but Tensorflow doesn't run simulation on GPU tensorflow-gpu 2.1.0 和 CUDA 10.1 看不到我的 GPU - My GPUs are not visible with tensorflow-gpu 2.1.0 and CUDA 10.1 TensorFlow-gpu-2.0.0rc2 找不到 cuda-10.1 库并跳过已注册的 GPU 设备 - TensorFlow-gpu-2.0.0rc2 cannot find cuda-10.1 libraries and skips registered GPU devices Tensorflow / CUDA:未检测到 GPU - Tensorflow / CUDA: GPU not detected 尝试安装 tensorflow-gpu 但出现此错误:CUDA 驱动程序版本不足以用于 CUDA 运行时版本 - Trying to install tensorflow-gpu but got this error: CUDA driver version is insufficient for CUDA runtime version 我可以让人们在使用不同CUDA依赖项安装的版本之上使用其他Tensorflow-gpu版本吗? - Can I let people use a different Tensorflow-gpu version above what they had installed with different CUDA dependencies?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM