-
Notifications
You must be signed in to change notification settings - Fork 64
Fix builtin min / max handling in device loop #1085
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
2956740 to
1a718f2
Compare
7c96893 to
0779ba6
Compare
d620f11 to
af6c723
Compare
af6c723 to
39c206d
Compare
| ) | ||
| ast.parse(code) | ||
|
|
||
| @skipIfPyTorchBaseVerLessThan("2.10") |
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.
PyTorch 2.9 has a indexing expression related bug that's only fixed in PyTorch nightly: pytorch/pytorch#131761. Making a patch for that in Helion framework is quite complicated, thus we skip this unit test unless we are on 2.10 version (including current nightly).
| if isinstance(x, int): | ||
| return sympy.Integer(x) | ||
| if isinstance(x, sympy.Expr): | ||
| return sympy.simplify(x) |
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.
Is there a need to simplify here? We don't simplify if given a symint. (Note sympify!=simplify)
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.
agreed we don't have to simplify here (was copying from existing resolve_block_id code, but removing it also passes tests)
Fixes #1067.