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

Add Unsqueeze and more support for squeeze #12734

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

ntarafdar
Copy link
Contributor

Ticket

Link to Github Issue

Problem description

There's no Unsqueeze support in ttnn. there's also squeeze but only in python with limited support

What's changed

Added Unsqueeze and squeeze as wrappers to reshape

Checklist

  • Post commit CI passes
  • Blackhole Post commit (if applicable)
  • Model regression CI testing passes (if applicable)
  • Device performance regression CI testing passes (if applicable)
  • New/Existing tests provide coverage for changes

Copy link
Contributor

@TT-BrianLiu TT-BrianLiu left a comment

Choose a reason for hiding this comment

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

Minor comments

tests/ttnn/unit_tests/test_squeeze.py Outdated Show resolved Hide resolved
tests/ttnn/unit_tests/test_unsqueeze.py Outdated Show resolved Hide resolved
tests/ttnn/unit_tests/test_squeeze.py Outdated Show resolved Hide resolved
@ntarafdar ntarafdar merged commit 8aa197a into main Sep 19, 2024
6 checks passed
@ntarafdar ntarafdar deleted the tarafdarTT/unsqueeze branch September 19, 2024 20:13
)
def squeeze(tensor, dim):
r"""squeeze(tensor: ttnn.Tensor, dim: int) -> ttnn.Tensor"""
if dim != 0:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@ayerofieiev-tt
This was removed,
We could add this back and only handle dim != 0 using the new stuff and handle dim==0 here.

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.

5 participants