Here, %1 and %3 only read the last two elements out of %0. When lowering this IR to linalg (-convert-torch-to-linalg), we get
error: unexpected error: 'tensor.cast' op operand type 'tensor<1x36x?x?xf32>' and result type 'tensor<1x72x84x384xf32>' are cast incompatible because the scales used by torch.aten.__interpolate.size_list_scale_list are not matching the output shape anymore.
The code in that pass seems to silently assume the the first two dimensions are not scaled, but ONNX has no such restriction.
With input
we get
Here,
%1
and%3
only read the last two elements out of%0
. When lowering this IR to linalg (-convert-torch-to-linalg
), we geterror: unexpected error: 'tensor.cast' op operand type 'tensor<1x36x?x?xf32>' and result type 'tensor<1x72x84x384xf32>' are cast incompatible
because the scales used bytorch.aten.__interpolate.size_list_scale_list
are not matching the output shape anymore.