GET3D icon indicating copy to clipboard operation
GET3D copied to clipboard

aten::cudnn_convolution_backward_weight not found

Open iszihan opened this issue 2 years ago • 4 comments

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 https://github.com/pytorch/pytorch/issues/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!

iszihan avatar Feb 15 '23 20:02 iszihan

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

SteveJunGao avatar Feb 17 '23 03:02 SteveJunGao

You're on the right track, keep following

Bathsheba avatar Feb 20 '23 16:02 Bathsheba

Hi @iszihan @Bathsheba,

any followups about this issue?

SteveJunGao avatar Feb 22 '23 18:02 SteveJunGao

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 `

iszihan avatar Feb 24 '23 19:02 iszihan