-
Notifications
You must be signed in to change notification settings - Fork 25.7k
[inductor] Handle aten.full's dtype in the decomposition #108443
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
In the lowering we don't have `SymFloat` and `SymInt`, we just have `sympy.Expr` so it is impossible to accurately determine the expected dtype of a `full` call. For example, `sym_float(int_expr)` has `is_integer=True` but should be treated as a float. In the decomposition though, we can get this right. [ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/108443
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7c5a6b2 with merge base 29f17e1 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
In the lowering we don't have `SymFloat` and `SymInt`, we just have `sympy.Expr` so it is impossible to accurately determine the expected dtype of a `full` call. For example, `sym_float(int_expr)` has `is_integer=True` but should be treated as a float. In the decomposition though, we can get this right. ghstack-source-id: a5b8e32 Pull Request resolved: pytorch#108443
…ion" In the lowering we don't have `SymFloat` and `SymInt`, we just have `sympy.Expr` so it is impossible to accurately determine the expected dtype of a `full` call. For example, `sym_float(int_expr)` has `is_integer=True` but should be treated as a float. In the decomposition though, we can get this right. cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng Xia-Weiwen wenzhe-nrv jiayisunx ipiszy ngimel yf225 chenyang78 kadeng muchulee8 aakhundov [ghstack-poisoned]
In the lowering we don't have `SymFloat` and `SymInt`, we just have `sympy.Expr` so it is impossible to accurately determine the expected dtype of a `full` call. For example, `sym_float(int_expr)` has `is_integer=True` but should be treated as a float. In the decomposition though, we can get this right. ghstack-source-id: 828e98b Pull Request resolved: #108443
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.
Don't we mark the symfloats as not integer so that Yukio's solution was also correct? This is a bit odd...
At any rate, having a solution at a higher level of abstraction is always better, so approving.
No, the test case I've included fails with Yukio's PR because the sympy expression for |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
In the lowering we don't have
SymFloatandSymInt, we just havesympy.Exprso it is impossible to accurately determine the expected dtype of a
fullcall.For example,
sym_float(int_expr)hasis_integer=Truebut should be treatedas a float. In the decomposition though, we can get this right.
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @ipiszy @ngimel @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov