-
Notifications
You must be signed in to change notification settings - Fork 91
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
Reshape -> Transpose gives bad PCC #13745
Comments
Have you tried |
I tested on my branch |
@yieldthought is this still an issue on main? |
@yieldthought can you comment if this is fixed? @sjameelTT just pushed a fix to transpose |
The test as provided in this issue still fails on main:
|
@ntarafdar can you add this test and arbitrary variants of it to your sweeps? The shapes in this test can be parametrized nicely to give lots of coverage for reshape -> transpose. In addition, please test {single device, multidevice} x {L1 interleaved, DRAM interleaved} x {RM, TILE}. If any of these configurations is not supported yet, it should assert that. |
This is a reshape issue, not a transpose issue: replace: and it will pass. @ntarafdar we should probably make sure that tensor.reshape pybind is the same as the ttnn.reshape... |
ahh CC: @jvegaTT tt_input.reshape does a view change and ignores padding... |
I'm closing this issue, since this is now working with @sjameelTT's suggestion. @cglagovichTT please file a separate issue for additional testing. |
I think the issue should stay open since |
tt_input.reshape is not the API to use. we are using ttnn api for transpose and a tensor API for reshape. |
In that case |
this might be a more involved change. |
I'd say that the reward is high. Unexpected API behavior like this cost developers lots of debug time |
Simple bugs like these are very time consuming and annoying to the customers. |
tt_input.reshape just updates the Metadata of the tensor without changing the data. This is what we want sometimes as some reshapes have no changes in the physical locations of the data or if we want to just include some of the padding data from the padded shape into the logical shape. ttnn.reshape will quickly check if it is valid to call tt_input.reshape and does so if possible. If not then it will do the actual reshape with the required data movements. There are use cases for both of these functions. Would renaming one of them be the solution? Both are extensively utilized all over our code base, it is a very involved change. |
It sounds like Also someone can check this, but in Pytorch doesn't |
This test still fails on main with |
### Ticket #13745 ### Problem description Linking Tensor.reshape to ttnn.reshape. Adding Tensor.reshape as an experimental operation under tonne ### Checklist - [x] Post commit CI passes https://github.com/tenstorrent/tt-metal/actions/runs/12202038977 - [x] Blackhole Post commit (if applicable) https://github.com/tenstorrent/tt-metal/actions/runs/12204887897 - [ ] Model regression CI testing passes (if applicable) - [x] Device performance regression CI testing passes (if applicable) https://github.com/tenstorrent/tt-metal/actions/runs/12204897132 - [ ] New/Existing tests provide coverage for changes
@yieldthought Is this still an open issue ? If not, can you please close this ticket ? Thanks. |
on Dec 10, @yieldthought said the unit test was still failing. @ntarafdar any updates since then? If not, you guys should try the unit test. |
The test in this issue still runs and still fails on main. What did you think the resolution was? Can you add the test code into a unit test on branch and only ping me here when it's passing or when the API's been changed to prevent tensor.reshape if that's the intended resolution? |
Hi, A fix was merged in a couple of weeks ago but it was subsequently reverted by Raymond as its interaction with a PR pushed just prior to it broke the testing infra. Nour is currently trying to re-push this fix in and is in the awaiting reviewers stage #16377 |
Describe the bug
gives 0.0 PCC compared to Torch:
To Reproduce
Expected behavior
Expected this to match torch behaviour.
Please complete the following environment information:
Internal IRD-supplied N150
Additional context
Seen bringing up Llama 3.2
The text was updated successfully, but these errors were encountered: