-
Notifications
You must be signed in to change notification settings - Fork 487
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
Add transposed case for at::convolution #917
Conversation
Can you squash the commits |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ramiro050 could you PTAL
python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/shape_lib_gen.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few initial comments
python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/shape_lib_gen.py
Outdated
Show resolved
Hide resolved
03fd7d0
to
fe89803
Compare
fe89803
to
da81a2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more comments/questions
python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/torch_ods_gen.py
Show resolved
Hide resolved
e683a3c
to
a035e6c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I just have one question
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gpetters94 Could you please resolve the conflicts?
a035e6c
to
de25c49
Compare
Done. |
Can we approve and merge this PR? @vivekkhandelwal1 @silvasean |
It looks like the shape function is not correct (failing PyTorch tests), see pytorch/pytorch#80860 |
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? |
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. |
It's holding up U-Net support, but it isn't the only thing blocking that. |
As @silvasean requested in [this issue](llvm/torch-mlir#917 (comment)) here is the shape code from Torch-MLIR for conv_transpose2d.input and convolution (updated for the transposed case). Pull Request resolved: #80860 Approved by: https://github.com/Gamrix
5906761
to
168fe6d
Compare
The PR on the PyTorch side is accepted. Can we merge this PR now? @vivekkhandelwal1 @silvasean |
… (#80860) Summary: As silvasean requested in [this issue](llvm/torch-mlir#917 (comment)) here is the shape code from Torch-MLIR for conv_transpose2d.input and convolution (updated for the transposed case). Pull Request resolved: #80860 Approved by: https://github.com/Gamrix Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/a7e7fbab82d0badaad116eab5a552f6246c3a5ac Original Phabricator Test Plan: Imported from GitHub, without a `Test Plan:` line. Reviewed By: atalman Differential Revision: D37674534 Pulled By: atalman fbshipit-source-id: 0747b91d5c43065b86e3d1ab1b4c06b9dc046b9f
@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. |
Sure. Once this PR (pytorch/pytorch#83557) is merged, we can get this patch merged. |
@vivekkhandelwal1 @silvasean The upstream shape code is merged, so this one should be good to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gpetters94 Could you please resolve the conflicts?
b5f3d43
to
d1401cf
Compare
@vivekkhandelwal1 Done. |
python/torch_mlir/dialects/torch/importer/jit_ir/build_tools/shape_lib_gen.py
Outdated
Show resolved
Hide resolved
d1401cf
to
063feb2
Compare
063feb2
to
be5a7d8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: Ettore Tiotto <etiotto@ca.ibm.com>
Here's transposed support for convolution, both strided and unstrided.