Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.2k
gh-132732: Treatbytes
as constants in_Py_uop_sym_is_safe_const
#136033
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
One thing that slightly worries me about this is that comparing |
Ok let's not do this then. We still need to fix the long stuff though so@sobolevn are you open to that or do you want me to handle it? |
I opened PR#136040 to fix the compact ints issue. |
Did you mean checking for |
Fidget-Spinner commentedJun 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
You can fetch the value once at the start of optimization time in |
Or, simpler, just explicitly disallow optimizing the problematic comparisons. |
If one of the values is of type bytes, require the other to be as well. |
Not just comparisons. BINARY_OP as well. This is a little annoying and more involved than I expected, so I'd say let's just ignore it for now? |
brandtbucher commentedJun 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
What |
Not BytesWarning. BINARY_OP (str, bytes) will throw. |
That’s the case for many combinations of safe types. We should suppress the error and hit bottom in that case (in the |
Same for |
This is just different because it’s a warning, to clarify. |
Yeah the optimizer currently doesn't do that. Opened a PR to do so#136048 |
I openedhttps://discuss.python.org/t/consider-deprecating-and-eventually-removing-b-cli-flag/96903 about possibly removing this warning in the future versions. It does not seem very useful :( |
sobolevn commentedJun 27, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I fixed the merge conflict. Sorry, I am rather new to the JIT internals, and I don't quite understand the
Is there anything I need to do in this PR to address them? |
We plan to follow up shortly with COMPARE_OP here#130415 |
Ok then :) |
Uh oh!
There was an error while loading.Please reload this page.