簡體   English   中英

CUDA Tensorflow 版本,nvidia-smi 版本問題。 獲取卷積算法失敗。 這可能是因為 cuDNN 初始化失敗,

[英]CUDA Tensorflow Version ,nvidia-smi version issue. Failed to get convolution algorithm. This is probably because cuDNN failed to initialize,

試過了, preds = model.predict(k[np.newaxis,...])

UnknownError:獲取卷積算法失敗。 這可能是因為 cuDNN 初始化失敗,因此請嘗試查看上面是否打印了警告日志消息。 [[節點模型/stem_conv/Conv2D(定義於:3)]] [Op:__inference_distributed_function_18348]

硬件: 制造商: OMEN,OS_ Windows 10,GPU NVIDIA GEFORCE RTX 2060,我的系統配置

!nvcc --版本

> nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2019 NVIDIA
> Corporation Built on Sun_Jul_28_19:12:52_Pacific_Daylight_Time_2019
> Cuda compilation tools, release 10.1, V10.1.243

!nvidia-smi

2020 年 7 月 20 日星期一 23:15:20

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 451.77       Driver Version: 451.77       CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 2060   WDDM  | 00000000:01:00.0 Off |                  N/A |
| N/A   38C    P8     5W /  N/A |   5304MiB /  6144MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A     18900      C   ...nvs\tensorflow\python.exe    N/A      |
+-----------------------------------------------------------------------------+

好像少了點什么。 CUDA 版本不同步是我猜的。 請糾正我。 如果它的 NVIDIA STUDIO 驅動程序不合適,請有人幫我一個適合 Tensorflow 2.1.0 的驅動程序

Tensor Flow Version: 2.1.0, Keras Version: 2.2.4-tf, Python 3.7.7 (default, May 6 2020, 11:45:54) [MSC v.1916 64 bit (AMD64)],Pandas 1.0.5 ,Scikit-Learn 0.23.1

我有類似的問題。 在我將 CUDA 從 11 版本降級到 10.1 版本( NVIDIA Link )后,它得到了修復。

根據 TF 文檔:

CUDA® Toolkit —TensorFlow 支持 CUDA 10.1 (TensorFlow >= 2.1.0)

編輯(更多信息如下):

您可以在以下位置找到兼容的驅動程序: https://www.nvidia.com/en-us/drivers/results/149127/

我使用Python 3.7以及安裝在conda環境中的tensorflow-gpu

注意:如果您使用pip install tensorflow ,它可能沒有下載 Z39466FE22B062A3868CFE0 所需的 python 包。 我建議您卸載/重新安裝:

pip install tensorflow-gpu

這是我的 output 用於快速測試:

import tensorflow as tf
print(tf.__version__)
print(tf.config.experimental.list_physical_devices('GPU'))
2.1.0
[PhysicalDevice(name='/physical_device:GPU:0', device_type='GPU')]

供你參考:

nvidia-smi

+-----------------------------------------------------------------------------+
| NVIDIA-SMI 431.70       Driver Version: 431.70       CUDA Version: 10.1     |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce RTX 206... WDDM  | 00000000:01:00.0  On |                  N/A |
| 32%   44C    P8    21W / 175W |    510MiB /  8192MiB |      3%      Default |
+-------------------------------+----------------------+----------------------+

nvcc --version

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

來自cudnn.h (路徑: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\include

請注意,您需要手動將文件移動到此位置。 請參考安裝說明:

下載: https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.1_20191031/cudnn-10.1-windows10-x64-v7.6.5.32.ZCDCD2229A8D84017

說明: https://docs.nvidia.com/deeplearning/sdk/cudnn-install/index.html#install-windows

#define CUDNN_MAJOR 7
#define CUDNN_MINOR 6
#define CUDNN_PATCHLEVEL 5

希望這可以幫助!

暫無
暫無

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

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