Skip to content

Conversation

@raayandhar
Copy link
Contributor

Intermediate view operations were not properly propagating static shapes. Thanks to Zach for pointing out how to fix this issue, see #4325 for more discussion. They key change is viewShapeInts[dim] = size to preserve the static shape.

I have kept the e2e Python tests for aten.unflatten and the MLIR tests for the TorchToLinalg conversion of unflatten as well, I think they may be useful for some more coverage that wasn't there before, but open to suggestions on whether or not to keep these.

Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

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

Thanks for the fix. I'd remove the unrelated tests (unflatten isn't actually related to the code change). Let me know when you'd like me to take another look and we can get it merged.

@raayandhar
Copy link
Contributor Author

Thanks for the fix. I'd remove the unrelated tests (unflatten isn't actually related to the code change). Let me know when you'd like me to take another look and we can get it merged.

Thanks for the feedback - I think it should be good for a look now.

@raayandhar
Copy link
Contributor Author

@zjgarvey now that we landed the fixes so that we don't get aten.as_strided in decompositions anymore, should we close this? But my understanding is that the OP still exists so it hasn't been fully deprecated yet...

@zjgarvey
Copy link
Collaborator

zjgarvey commented Dec 5, 2025

@raayandhar we should really emit a fatal error on seeing this op. There is no way we can support this.

@raayandhar
Copy link
Contributor Author

@raayandhar we should really emit a fatal error on seeing this op. There is no way we can support this.

Sounds good, closing

@raayandhar raayandhar closed this Dec 5, 2025
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