Skip to content

Fixed ConvTranspose2d/3d breaking on newer PyTorch versions - #62

Open
InboraStudio wants to merge 3 commits into
apple:mainfrom
InboraStudio:main
Open

Fixed ConvTranspose2d/3d breaking on newer PyTorch versions#62
InboraStudio wants to merge 3 commits into
apple:mainfrom
InboraStudio:main

Conversation

@InboraStudio

Copy link
Copy Markdown

Hey, noticed that conv_transpose2d and conv_transpose3d were using an older
.input overload in the ATEN op mapping that got deprecated in PyTorch 2.9.
This meant any model with transpose convolution layers would silently break
during graph-mode quantization on newer PyTorch installs

Switched both over to the .default overload which is the standard now,
and kept a small fallback in place so it still works fine on PyTorch 2.8.x

Should be a safe, non-breaking change across the full supported version range

@aseemw

aseemw commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Thanks for the fix @InboraStudio. Good catch and looks good to go.
But first, can you please also add a unit test that fails without this change and passes with it (on torch 2.9 and above, and continues to pass for torch 2.8).

@InboraStudio

Copy link
Copy Markdown
Author

Thanks for the fix @InboraStudio. Good catch and looks good to go. But first, can you please also add a unit test that fails without this change and passes with it (on torch 2.9 and above, and continues to pass for torch 2.8).

I have done that thanks for letting me know

@guru-desh

Copy link
Copy Markdown
Contributor

Thanks for the fix @InboraStudio. Good catch and looks good to go. But first, can you please also add a unit test that fails without this change and passes with it (on torch 2.9 and above, and continues to pass for torch 2.8).

I have done that thanks for letting me know

Thanks for the fix!

The tests written assert that items in the ATEN_OP_TO_MODULE_TYPE list are as they should be, which tests implementation, but doesn't test coreai-opt behavior.

Could you remove these tests and write tests in test_axis_defaults as ATEN_OP_TO_MODULE_TYPE is used for setting axis defaults for weight quantization?

Also, the CI is failing with the following error:

AttributeError: The underlying op of 'aten.conv_transpose2d' has no overload name 'default'

@InboraStudio

Copy link
Copy Markdown
Author

Thanks for the fix @InboraStudio. Good catch and looks good to go. But first, can you please also add a unit test that fails without this change and passes with it (on torch 2.9 and above, and continues to pass for torch 2.8).

I have done that thanks for letting me know

Thanks for the fix!

The tests written assert that items in the ATEN_OP_TO_MODULE_TYPE list are as they should be, which tests implementation, but doesn't test coreai-opt behavior.

Could you remove these tests and write tests in test_axis_defaults as ATEN_OP_TO_MODULE_TYPE is used for setting axis defaults for weight quantization?

Also, the CI is failing with the following error:

AttributeError: The underlying op of 'aten.conv_transpose2d' has no overload name 'default'

You were right I misread the overload name .default doesn't exist for conv_transpose2d/3d in torch 2.8–2.11

@guru-desh

Copy link
Copy Markdown
Contributor

I'm seeing that the only change in the PR is adding TestConvTransposeAxisDefaultsGraph.

Where is .default being called? I'm not exactly sure what the fix is?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants