windows 配置 paddle CUDA 环境

安装CUDA

  • 查看支持的CUDA版本
nvidia-smi

image

这个CUDA 版本是指GUP支持的最高CUDA API版本 并不是当前的CUDA 版本

https://developer.nvidia.com/cuda-toolkit-archive

image

下载对应版本的安装包,并安装
image

安装 paddle

python -m pip install paddlepaddle-gpu==2.4.2.post117 -f https://www.paddlepaddle.org.cn/whl/windows/mkl/avx/stable.html

验证

>>> import paddle            
>>> paddle.utils.run_check()
Running verify PaddlePaddle program ... 
PaddlePaddle works well on 1 GPU.
PaddlePaddle works well on 1 GPUs.
PaddlePaddle is installed successfully! Let's start deep learning with PaddlePaddle now.

报错处理

RuntimeError: (PreconditionNotMet) The third-party dynamic library (cudnn64_7.dll) that Paddle depends on is not

这是因为没有安装 cudnn
https://developer.nvidia.com/rdp/cudnn-download
image

把文件夹复制到 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7
image

Could not locate cudnn_ops_infer64_8.dll. Please make sure it is in your lib

https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-zlib-windows

下载后找到zlibwapi.dll 复制到PATH
image

posted @ 2023-03-08 16:40  三木燕  阅读(1346)  评论(0编辑  收藏  举报