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

[TorchToLinalg] Fix AtenReflectionPad2dOp lowering to not assert when dimensions unknown #3758

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

giacs-epic
Copy link
Contributor

@giacs-epic giacs-epic commented Oct 3, 2024

The asserts make the compiler crash (with a misleading error) also when vertical or horizontal dimensions are unknown (which is a valid state at this stage).
Add dynamic asserts when dimensions are not known.

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.

Makes sense! Does the conversion even work if the input shape is dynamic? Can we add a dynamic test (either a lit test or preferably an e2e test) to make sure that path actually works?

@giacs-epic
Copy link
Contributor Author

@zjgarvey I just added a dynamic test, it seems to work fine! I also took the chance to add dynamic asserts.

@giacs-epic
Copy link
Contributor Author

@zjgarvey I just added a dynamic test, it seems to work fine! I also took the chance to add dynamic asserts.

I struggle to understand the CI error. It seems like when exporting to onnx it interprets the input sizes as [1, 1, 1] instead of [1, -1, -1]. A PyTorch bug?

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