-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[ONNX][dynamo_export] Turn off opmath for type promotion #113780
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
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/113780
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 726d6bc with merge base aeb5fd5 ( FLAKY - The following job failed but was likely due to flakiness present on trunk:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
[ghstack-poisoned]
… for type promotion" [ghstack-poisoned]
| "native_batch_norm", | ||
| "dot", | ||
| "logit", | ||
| "rsub", |
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.
At some point we can refactor this file to follow what’s in ONNX Script so the meta data is clearer
…ime' on "[ONNX][dynamo_export] Turn off opmath for type promotion" [ghstack-poisoned]
[ghstack-poisoned]
| "nn.functional.celu", | ||
| dtypes=(torch.float16,), | ||
| reason=onnx_test_common.reason_onnx_does_not_support("Celu", "float16"), | ||
| ), |
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.
non-blocking microsoft/onnxscript#1158
Such that even if failures occur during model run, the sample inputs are accessible for later investigation. Pull Request resolved: #114163 Approved by: https://github.com/thiagocrepaldi ghstack dependencies: #113780
Stack from ghstack (oldest at bottom):
Although opmath is the right thing to do to retain on-par precision, it inserts
upcasts everywhere in the graph. This is particularly hard for backend to optimize
since there is no way to differentiate between inserted upcasts and model code
casts. Hence we consolidate the input dtype to the result dtype to avoid this.