简体   繁体   English

cudaGetDevice() 失败。 状态:CUDA 驱动程序版本对于 CUDA 运行时版本不足(在 GCP - 在 VNC GUI 中运行的 Ubuntu 18 LTS)

[英]cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version (on GCP - Ubuntu 18 LTS running in VNC GUI)

I have followed this link to get all my versions in order:我已点击此链接按顺序获取我的所有版本:

I need to use Tensorflow_GPU_1.14.0 for legacy code purposes.我需要将 Tensorflow_GPU_1.14.0 用于遗留代码。

Therefore:所以:

tensorflow_gpu-1.14.0 tensorflow_gpu-1.14.0
Python: 2.7, 3.3-3.7蟒蛇:2.7、3.3-3.7
cuDnn: 7.4立方网络:7.4
Cuda: 10.0库达:10.0

import tensorflow as tf; print(tf.__version__)

returns 1.14.0返回 1.14.0

My nvcc Version is:我的 nvcc 版本是:

nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2018 NVIDIA Corporation
Built on Sat_Aug_25_21:08:01_CDT_2018
Cuda compilation tools, release 10.0, V10.0.130

My nvidia-smi is:我的 nvidia-smi 是:

nvidia-smi
Wed Jan 22 16:47:10 2020       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 410.104      Driver Version: 410.104      CUDA Version: 10.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  Tesla K80           Off  | 00000000:00:04.0 Off |                    0 |
| N/A   47C    P8    31W / 149W |     27MiB / 11441MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0      2524      G   /usr/lib/xorg/Xorg                             9MiB |
|    0      2574      G   /usr/bin/gnome-shell                           6MiB |
+-----------------------------------------------------------------------------+

And my Cudnn version is:我的 Cudnn 版本是:

cat /usr/include/cudnn.h | grep CUDNN_MAJOR -A 2
#define CUDNN_MAJOR 7
#define CUDNN_MINOR 4
#define CUDNN_PATCHLEVEL 2
--
#define CUDNN_VERSION (CUDNN_MAJOR * 1000 + CUDNN_MINOR * 100 + CUDNN_PATCHLEVEL)
#include "driver_types.h"

My python version:我的蟒蛇版本:

import sys

print(sys.version)
3.6.10 |Anaconda, Inc.| (default, Jan  7 2020, 21:14:29) 
[GCC 7.3.0]

I am using Ubuntu 18.04 LTS我正在使用 Ubuntu 18.04 LTS

To expand on Robert answer in the comment section below, I first uninstalled the existing nvidia by using为了在下面的评论部分扩展罗伯特的回答,我首先使用卸载了现有的 nvidia

sudo apt-get purge nvidia-*

Then installed the newest version using然后使用安装最新版本

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update
sudo apt upgrade
ubuntu-drivers list

Then from the list I choose然后从我选择的列表中

sudo apt install nvidia-driver-VERSION_NUMBER_HERE

Then I sudo reboot my instance, and executed the following code in Jupyter notebook.然后我sudo reboot我的实例,并在 Jupyter notebook 中执行以下代码。

import tensorflow as tf
print(('Is your GPU available for use?\n{0}').format(
    'Yes, your GPU is available: True' if tf.test.is_gpu_available() == True else 'No, your GPU is NOT available: False'
))

print(('\nYour devices that are available:\n{0}').format(
    [device.name for device in tf.config.experimental.list_physical_devices()]
))

And it worked它奏效了

暂无
暂无

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

相关问题 内部错误:cudaGetDevice() 失败。 状态:CUDA 驱动程序版本不足 CUDA 运行时版本 ANACONDA WINDOWS - InternalError: cudaGetDevice() failed. Status: CUDA driver version is insufficient for CUDA runtime version ANACONDA WINDOWS CUDA驱动程序版本不足以用于CUDA运行时版本CUDA 10.0版本 - CUDA driver version is insufficient for CUDA runtime version , CUDA version 10.0 张量流错误 CUDA驱动程序版本不足于CUDA运行时版本 - tensorflow error. CUDA driver version is insufficient for CUDA runtime version RuntimeError:CUDA运行时错误(35):CUDA驱动程序版本对于CUDA运行时版本不足,位于Torch / csrc / cuda / Module.cpp:51 - RuntimeError: cuda runtime error (35) : CUDA driver version is insufficient for CUDA runtime version at torch/csrc/cuda/Module.cpp:51 Windows 10 Ubuntu Shell“ CUDA驱动程序版本不足” - Windows 10 Ubuntu Shell “CUDA driver version is insufficient” 尝试安装 tensorflow-gpu 但出现此错误:CUDA 驱动程序版本不足以用于 CUDA 运行时版本 - Trying to install tensorflow-gpu but got this error: CUDA driver version is insufficient for CUDA runtime version PyDev告诉“错误== cudaSuccess(35 vs. 0)CUDA驱动程序版本不足于CUDA运行时版本”,但命令行可以正常运行 - PyDev tells “error == cudaSuccess (35 vs. 0)CUDA driver version is insufficient for CUDA runtime version”,but command line works fine 内部错误:cudaGetDevice() 失败。 状态:运行时初始化错误 tensorflow - InternalError: cudaGetDevice() failed. Status: initialization error when running tensorflow RuntimeError: cudaGetDevice() 失败。 状态:无效参数 - RuntimeError: cudaGetDevice() failed. Status: invalid argument 张量流 cudaGetDevice() 失败。 状态:未找到 cudaGetErrorString 符号。? - tensorflow cudaGetDevice() failed. Status: cudaGetErrorString symbol not found.?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM