提示错误
PreconditionNotMetError: The third-party dynamic library (cudnn64_8.dll) that Paddle depends on is not configured correctly. (error code is 126),即 Paddle 依赖的 cudnn64_8.dll 文件没有配置正确。
原因:
在 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.7\bin 这个文件夹下缺少 cudnn64_8.dll 文件。在以下地址中下载文件后移入上述文件路径下即可。
cudnn64_8.dll free download | DLL‑files.com
配置成功后:
if __name__ == '__main__':
import paddle
print(paddle.utils.run_check())