Skip to content
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

Could not load library cudnn_ops_infer64_8.dll. Error code 126 #46312

Closed
KagamiMiro opened this issue Oct 14, 2020 · 8 comments · Fixed by pytorch/builder#557
Closed

Could not load library cudnn_ops_infer64_8.dll. Error code 126 #46312

KagamiMiro opened this issue Oct 14, 2020 · 8 comments · Fixed by pytorch/builder#557
Labels
module: build Build system issues module: windows Windows support for PyTorch triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@KagamiMiro
Copy link

KagamiMiro commented Oct 14, 2020

After upgrade to rtx3090, I reinstalled my Windows10 and pytorch with

conda install pytorch torchvision cudatoolkit=11 -c pytorch-nightly

When I use nn.Conv/nn.BatchNorm layer in my module and do the forward propagation, it shows

Could not load library cudnn_ops_infer64_8.dll. Error code 126
Please make sure cudnn_ops_infer64_8.dll is in your library path!

in Vscode

Process finished with exit code -1073740791 (0xC0000409)

in Pycharm

I’ve tried reinstalling pytorch and installed cuda toolkit 11 from developer.nvidia.com, but the problem remains unsolved.

import torch
import torch.nn as nn

class test(nn.Module):
    def __init__(self):
        super(test, self).__init__()
        self.l = nn.Conv2d(1,1,3)
    def forward(self, input):
        return self.l(input)

net = test().cuda()
print(net(torch.rand(1,1,5,5).cuda()))

cc @malfet @seemethere @walterddr @peterjc123 @maxluk @nbcsm @guyang3532 @gunandrose4u @smartcat2010 @mszhanyi

@malfet malfet added module: build Build system issues module: windows Windows support for PyTorch triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Oct 14, 2020
@malfet
Copy link
Contributor

malfet commented Oct 14, 2020

I think we just missed this dll from our packaging scripts. Thank you for reporting

@malfet
Copy link
Contributor

malfet commented Oct 14, 2020

According to https://app.circleci.com/pipelines/github/pytorch/pytorch/226808/workflows/ca8f2f51-ec15-468d-a8d2-7c3217418348/jobs/8209403
the libraries is copied into the nightly .whl package:

  adding 'torch/lib/cudnn_ops_infer64_8.dll'

@zhuqiangLu
Copy link

zhuqiangLu commented Oct 14, 2020

Hi, @KagamiMiro

You can download the cudnn achieve from https://developer.nvidia.com/rdp/cudnn-archive and simply put the dlls to your pytorch lib. For example, in my case, I need to put these dlls to E:\ANACONDA\Lib\site-packages\torch\lib

@peterjc123
Copy link
Collaborator

peterjc123 commented Oct 15, 2020

Thanks for reporting. I will take a look.

@KagamiMiro
Copy link
Author

Thank you guys so much!

@peterjc123
Copy link
Collaborator

peterjc123 commented Oct 17, 2020

Verified the fix pytorch/builder#557 is working in 1.8.0.dev20201016 builds.

@KagamiMiro
Copy link
Author

Verified the fix pytorch/builder#557 is working in 1.8.0.dev20201016 builds.

Perfectly fixed👌

@surendrallam
Copy link

Hi,
Have faced the same issue, could able to fix it by downloading the files from CUDNN and copy to "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDNN\v5.1\bin".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: build Build system issues module: windows Windows support for PyTorch triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants