Skip to content

Conversation

@Lallapallooza
Copy link
Contributor

Lower aten.conv_transpose2d into tosa.transpose_conv2d. Refresh FX importer TOSA xfails to drop the transpose-conv cases that now pass, and document the weight layout mapping.

@Lallapallooza
Copy link
Contributor Author

@sahas3 @sjarus can you please take a look?

Copy link
Member

@sahas3 sahas3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change looks good to me. Some minor comments and clarifying questions.

Lower aten.conv_transpose2d into tosa.transpose_conv2d. Refresh FX importer
TOSA xfails to drop the transpose-conv cases that now pass, and document
the weight layout mapping.

Change-Id: I709579e40a1ccaf9b9188392c7c78fcb653109ce
@Lallapallooza Lallapallooza force-pushed the vit/add-transpose-convs-only branch from f6e53b6 to 6db8cd6 Compare November 5, 2025 15:42
@Lallapallooza Lallapallooza requested a review from sahas3 November 5, 2025 15:44
Copy link
Member

@sahas3 sahas3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG once you fix the issue about failure check after IR rewrites.

For future reference, it'll be good if you preserve the commits since it's easier to review what's changed since last time review was provided. We can squash commits during merge. Thanks!

Comment on lines +2418 to +2425
return rewriter.notifyMatchFailure(
op, "Unimplemented: grouped transposed convolution not supported by "
"TOSA");
if (dilation[0] != 1 || dilation[1] != 1)
return rewriter.notifyMatchFailure(
op, "Unimplemented: dilated transposed convolution not supported by "
"TOSA");

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these notify failures need to happen before any IR rewrites take place, otherwise the pattern rewriter ends up in a recursive loop. For example, on line 2410 we'd have already introduced tosa.transpose and then we'll bail out from here for a failure case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed for transpose and depthwise paths.

Lazily create the NHWC input transpose so we emit it only once the failure
guards in the transposed and depthwise convolution rewrite succeed.

Change-Id: Ia362deda898794397107f6da3c44cd89f219f58f
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.

2 participants