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

aten::cudnn_convolution_backward_weight not found #96

Open
iszihan opened this issue Feb 15, 2023 · 4 comments
Open

aten::cudnn_convolution_backward_weight not found #96

iszihan opened this issue Feb 15, 2023 · 4 comments

Comments

@iszihan
Copy link

iszihan commented Feb 15, 2023

Hello, I was trying to run the training file but got this error after following some fixes with this #91

aten::cudnn_convolution_backward_weight not found when calling from ops/conv2d_grad_fix.py line 179. After searching around, it seems to suggest we need to replace this function with aten::convolution_backward (according to pytorch/pytorch#74437), which requires a shuffling of input arguments and some additional arguments such as output mask, and bias size. I'm wondering if you know another fix and if not, how should one modify the arguments to convolution_backward() for this call? Thank you!

@SteveJunGao
Copy link
Collaborator

SteveJunGao commented Feb 17, 2023

Hi @iszihan,

I guess this is related to the version of pytorch, are you using pytorch 1.9.0?

You can also try the fix from Stylegan3 codebase if you're using higher pytorch version

@Bathsheba
Copy link

You're on the right track, keep following

@SteveJunGao
Copy link
Collaborator

Hi @iszihan @Bathsheba,

any followups about this issue?

@iszihan
Copy link
Author

iszihan commented Feb 24, 2023

I'm on pytorch 1.13.0, and currently the code does run with the following modification though I'm not 100% sure if this does what the old code do.

`
name = 'aten::convolution_backward'

#flags = [torch.backends.cudnn.benchmark, torch.backends.cudnn.deterministic, torch.backends.cudnn.allow_tf32]

op, _ = torch._C._jit_get_operation(name)

empty_weight = torch.tensor(0.0, dtype=input.dtype, device=input.device).expand(weight_shape)

output_mask = [False,True,False]

_, grad_weight, _ = op(grad_output, input, empty_weight, None, stride, padding, dilation, transpose, (0,0), groups, output_mask) #*flags)

return grad_weight
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants