torch-mlir icon indicating copy to clipboard operation
torch-mlir copied to clipboard

Add transposed case for at::convolution

Open gpetters94 opened this issue 3 years ago • 10 comments

Here's transposed support for convolution, both strided and unstrided.

gpetters94 avatar Jun 08 '22 07:06 gpetters94

Can you squash the commits

dan-garvey avatar Jun 13 '22 16:06 dan-garvey

@gpetters94 Could you please resolve the conflicts?

Done.

gpetters94 avatar Aug 06 '22 06:08 gpetters94

Can we approve and merge this PR? @vivekkhandelwal1 @silvasean

ZihengJiang avatar Aug 08 '22 04:08 ZihengJiang

It looks like the shape function is not correct (failing PyTorch tests), see https://github.com/pytorch/pytorch/pull/80860

silvasean avatar Aug 08 '22 22:08 silvasean

Oh, sorry, it is an "incorrect shape compute mapping function schema name" not incorrect shape function. Yes, we in general wait for these change to land upstream. Is there an urgent reason to merge it now?

silvasean avatar Aug 08 '22 22:08 silvasean

We are working on the transposed convolution on the Torch2MHLO lowering side so checked this PR to see whether we can merge it. It's ok to wait the upstream PR to be merged though.

ZihengJiang avatar Aug 08 '22 23:08 ZihengJiang

It's holding up U-Net support, but it isn't the only thing blocking that.

gpetters94 avatar Aug 08 '22 23:08 gpetters94

The PR on the PyTorch side is accepted. Can we merge this PR now? @vivekkhandelwal1 @silvasean

ZihengJiang avatar Aug 15 '22 16:08 ZihengJiang

@ZihengJiang @silvasean I made a small change in the shape logic (I forgot that two of the dims needed transposing) so I need to make another PR in Pytorch that will hopefully not take long to get upstreamed this time. Otherwise this is passing all the tests.

gpetters94 avatar Aug 16 '22 20:08 gpetters94

The PR on the PyTorch side is accepted. Can we merge this PR now? @vivekkhandelwal1 @silvasean

Sure. Once this PR (https://github.com/pytorch/pytorch/pull/83557) is merged, we can get this patch merged.

vivekkhandelwal1 avatar Aug 17 '22 06:08 vivekkhandelwal1

@vivekkhandelwal1 @silvasean The upstream shape code is merged, so this one should be good to go.

gpetters94 avatar Aug 22 '22 19:08 gpetters94

@vivekkhandelwal1 Done.

gpetters94 avatar Aug 23 '22 06:08 gpetters94