-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
paddlepaddle-gpu安装后找不到cudnn库 #53009
Comments
你好,我们已经收到你的建议。我们会内部讨论是否需要提供通用解决方案。 |
@ZOUG 这个问题应该是conda安装的问题,没有将相应的安装信息添加到PATH环境变量里,可以手动在环境变量PATH里添加。或者重新安装conda时,勾选 |
@zhouwei25 我的主贴里特地强调了这个问题,你还是没理解。我举例详细说明一下吧。 假设我在Windows上安装了Anaconda,安装路径为 现在我要新建一个包含paddle的开发环境,起名为 接下来,我因为开发需要又建立了一个包含paddle的环境,起名为 再接下来,我因为开发需要又要新建一个包含paddle的环境,起名为 也就是说,一旦使用了conda,cudnn库的位置是不固定的。简单地往PATH变量里加一个固定的路径是无法解决问题的!! 必须在程序启动时根据运行环境动态找到正确的路径,把它加到当前程序的PATH变量里去(注意,这个操作只会改变当前程序的PATH变量,对其它程序没有影响),才能调用正确的cudnn库。 另外补充一句, |
使用宏变量
build时硬编码 Paddle/paddle/scripts/paddle_build.bat Line 353 in 1b8a1a9
应在运行时读取环境变量 |
ubuntu 系统有临时方案吗?大佬 |
Since you haven't replied for more than a year, we have closed this issue/pr. |
问题描述 Issue Description
使用conda按照官方网站说明安装paddlepaddle-gpu。完成后按说明验证安装,显示如下错误:
版本&环境信息 Version & Environment Information
PaddlePaddle-GPU版本: 2.4.2
GPU:CUDA 11.7,cuDNN 8.4.1
系统环境:Windows 10
Python版本:3.10
临时解决方案 Workaround
造成这个问题的原因在于paddlepaddle-gpu没有尝试在conda安装环境中寻找cudnn库。我尝试了一下,在Python程序中增加以下代码可以解决问题:
使用conda安装时,每个conda环境中单独安装cudatoolkit,因此对应cudnn库的路径是不固定的,paddlepaddle-gpu启动程序应当尝试自动根据系统和安装环境信息寻找cudnn库。这里给出的临时解决方案只针对Windows + conda环境,若需要通用解决方案还需拓展到其它安装环境。
The text was updated successfully, but these errors were encountered: