Closed
Description
cc @eellison Repro for the bug while running TorchDynamo + AOTAutograd with Torchscript
It seems like, torchscript expects the default values for torch.ops.aten.avg_pool2d_backward
to be present.
The error can be repro by - python torchbench.py --training --devices=cuda --accuracy-aot-ts --only=Super_SloMo
RuntimeError:
Arguments for call are not valid.
The following variants are available:
aten::avg_pool2d_backward(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, bool ceil_mode, bool count_include_pad, int? divisor_override) -> (Tensor):
Expected a value of type 'List[int]' for argument 'stride' but instead found type 'List[Tensor]'.
Empty lists default to List[Tensor]. Add a variable annotation to the assignment to create an empty list of another type (torch.jit.annotate(List[T, []]) where T is the type of elements in the list for Python 2)
aten::avg_pool2d_backward.grad_input(Tensor grad_output, Tensor self, int[2] kernel_size, int[2] stride, int[2] padding, bool ceil_mode, bool count_include_pad, int? divisor_override, *, Tensor(a!) grad_input) -> (Tensor(a!)):
Expected a value of type 'List[int]' for argument 'stride' but instead found type 'List[Tensor]'.
Empty lists default to List[Tensor]. Add a variable annotation to the assignment to create an empty list of another type (torch.jit.annotate(List[T, []]) where T is the type of elements in the list for Python 2)
The original call is:
File "<eval_with_key>.12", line 362
getitem_95 = convolution_backward_22[1]
getitem_96 = convolution_backward_22[2]; convolution_backward_22 = None
avg_pool2d_backward = torch.ops.aten.avg_pool2d_backward(getitem_94, leaky_relu_32, [2, 2], [], [0, 0], False, True, None); getitem_94 = leaky_relu_32 = None
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
add_46 = torch.ops.aten.add(detach_195, avg_pool2d_backward); detach_195 = avg_pool2d_backward = None
leaky_relu_backward_13 = torch.ops.aten.leaky_relu_backward(add_46, convolution_32, 0.1, False); add_46 = convolution_32 = None
ERROR
Metadata
Metadata
Assignees
Labels
No labels