Skip to content
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

1D Convolution where input spatial dimension isn't 2 #2358

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sdjukicTT
Copy link
Contributor

@sdjukicTT sdjukicTT commented Mar 4, 2025

Ticket

#2357

Problem description

In TTIR to TTIR decomposition, Legalize1DConvolutionPattern is not currently supporting spatial dimensions other than 2.

What's changed

This case is already supported and the check isn't necessary. After reshaping input and output to match 2D ttir.convolution op and the new ttir.convolution op is picked up by the ConvolutionToConv2dPattern, the dimensions are permuted and handled correctly.
Added a test for this case.

Checklist

  • New/Existing tests provide coverage for changes

@sdjukicTT sdjukicTT requested a review from mrakitaTT March 4, 2025 14:09
@@ -17,4 +17,24 @@ module {
// CHECK: return %{{.*}} : tensor<1x1024x512xf32, #ttnn_layout3>
return %1 : tensor<1x1024x512xf32>
}

func.func public @conv1d_test2(%arg0: tensor<1x7x768xbf16>, %arg1: tensor<1x192x768xbf16>) -> (tensor<1x7x768xbf16>) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's just put some more descriptive test names than test1 and test2, or write some comment above each test explaining the case it is testing :)

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.

4 participants