栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

paddle cuda11_paddlepaddle cuda11?

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

paddle cuda11_paddlepaddle cuda11?

因为有个作业要求paddle里的包,在paddle官网https://www.paddlepaddle.org.cn/install/quick?docurl=/documentation/docs/zh/install/pip/windows-pip.html

有详细的安装步骤,我的电脑装了cuda10.2+cudnn7.6.5,应该都是匹配的,但是在最后验证的时候,报错:RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_7.dll) that Paddle depends on is not configured correctly. (error code is 126)

base) C:Usersfengx>conda activate paddle_gpu

(paddle_gpu) C:Usersfengx>python
Python 3.7.12 | packaged by conda-forge | (default, Oct 26 2021, 05:35:01) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle.fluid
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ...
W0328 19:32:02.899677 13852 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 5.0, Driver API Version: 11.3, Runtime API Version: 10.2
W0328 19:32:02.901669 13852 dynamic_loader.cc:258] Note: [Recommend] copy cudnn into CUDA installation directory.
 For instance, download cudnn-10.0-windows10-x64-v7.6.5.32.zip from NVIDIA's official website,
then, unzip it and copy it into C:Program FilesNVIDIA GPU Computing ToolkitCUDAv10.0
You should do this according to your CUDA installation directory and CUDNN version.
Traceback (most recent call last):
  File "", line 1, in 
  File "D:DeepLearningenvspaddle_gpulibsite-packagespaddleutilsinstall_check.py", line 196, in run_check
    _run_static_single(use_cuda)
  File "D:DeepLearningenvspaddle_gpulibsite-packagespaddleutilsinstall_check.py", line 124, in _run_static_single
    exe.run(startup_prog)
  File "D:DeepLearningenvspaddle_gpulibsite-packagespaddlefluidexecutor.py", line 1262, in run
    six.reraise(*sys.exc_info())
  File "D:DeepLearningenvspaddle_gpulibsite-packagessix.py", line 719, in reraise
    raise value
  File "D:DeepLearningenvspaddle_gpulibsite-packagespaddlefluidexecutor.py", line 1260, in run
    return_merged=return_merged)
  File "D:DeepLearningenvspaddle_gpulibsite-packagespaddlefluidexecutor.py", line 1402, in _run_impl
    use_program_cache=use_program_cache)
  File "D:DeepLearningenvspaddle_gpulibsite-packagespaddlefluidexecutor.py", line 1492, in _run_program
    [fetch_var_name])
RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_7.dll) that Paddle depends on is not configured correctly. (error code is 126)
  Suggestions:
  1. Check if the third-party dynamic library (e.g. CUDA, CUDNN) is installed correctly and its version is matched with paddlepaddle you installed.
  2. Configure third-party dynamic library environment variables as follows:
  - Linux: set LD_LIBRARY_PATH by `export LD_LIBRARY_PATH=...`
  - Windows: set PATH by `set PATH=XXX; (at ..paddlefluidplatformdynloaddynamic_loader.cc:285)

可以看到报错原因是缺少cudnn64_7.dll文件,对应的目录是自己的cuda安装路径:C:Program FilesNVIDIA GPU Computing ToolkitCUDAv10.2

我重新下载了cudnn64_7.dll文件,放到对应的目录,重新验证发现成功:PaddlePaddle is installed successfully!

>>> import paddle.fluid
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ...
W0328 20:32:03.417174 14928 device_context.cc:447] Please NOTE: device: 0, GPU Compute Capability: 5.0, Driver API Version: 11.3, Runtime API Version: 10.2
W0328 20:32:03.576746 14928 device_context.cc:465] device: 0, cuDNN Version: 7.6.
PaddlePaddle works well on 1 GPU.
PaddlePaddle works well on 1 GPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/786569.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号