-
Notifications
You must be signed in to change notification settings - Fork 72
Add aten_maximum_real #2371
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 aten_maximum_real #2371
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2371 +/- ##
==========================================
- Coverage 70.14% 70.14% -0.01%
==========================================
Files 197 197
Lines 24983 24986 +3
Branches 2667 2667
==========================================
+ Hits 17525 17526 +1
- Misses 6531 6533 +2
Partials 927 927 ☔ View full report in Codecov by Sentry. |
The types should be promoted already when the op is being translated and should be handled by
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explained above and for further discussions
There is a regression for the model XGLMForCausalLM. I tried this change based on the error message I got (missing signature for aten::max.other). But type promotion fails as you mentioned. Error: Type parameter (T) of Optype (Max) bound to different types (tensor(float16) and tensor(float) in node (n0). |
Looks like max.other is an alias of maximum (https://github.com/pytorch/pytorch/blob/b44306d3681d5b248e6b439d293ea0d5a8903a61/aten/src/ATen/native/native_functions.yaml#L10064-L10069). I think we can do one of two things:
|
I will take a look and update it here. |
#2377 should fix what this PR tried to fix. |
Issue revealed by #2371, which aten.max.other is lack of matching overload. It's caused by missing type promotion. The reason is that aten::max.other (binary max) is an alias of aten::maimum.default. Thus, iwhen type promotion pass dispatches torch.max through `__torch__dispatch__`, it does not find aten::max.other (However, I am not sure how `make_fx` dispatches torch.max to aten::max.other). The existence of aten::max.other looks like a legacy code: pytorch/pytorch#42579.
No description provided.