-
Notifications
You must be signed in to change notification settings - Fork 26
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
persistent_dict can't store NaNs #287
Comments
We can't really check for NaN in persistent dict, as we would have to traverse the entire key (expensive!). We'll need to rely on the user to not have NaN values. It might be worth a word of warning in the persistent dict documentation though. Beyond that, I think this is more a loopy bug. It should replace NaN values with pymbolic NaNs. |
Could we emit a warning while generating the key when we encounter a NaN? (done in #288) Edit: Or perhaps, set a flag somewhere for the key that stores whether key contained a NaN, and perform the key traversal when that flag is set in the collision check. |
"Walking a value" is not really well-defined in Python, so I'd rather not try. |
🤦
Perhaps we should also check if the value is a
Nan
in the collision check? Are there other cases that could be at issue here (inf
seems to be fine)?cc inducer/loopy#828 [major plot twist!]
The text was updated successfully, but these errors were encountered: