-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Add support for floating point exceptions #47930
base: master
Are you sure you want to change the base?
Conversation
01ff7ea
to
aef54b4
Compare
aef54b4
to
e024f5d
Compare
@c42f you expressed interest in this. One issue is that the floating point environment is tied to a thread: for our purposes, it would probably make more sense to tie it to a task. this would require saving and restoring the floating point environment whenever we switch tasks. I assume we can do this by adding a |
This doesn't really make sense without hooking up the constrained fp intrinsics from the LLVM side, because otherwise LLVM will just be free to move things around and you'll get unexpected results. |
I disagree: while the results might be a bit unreliable, it's still helpful for figuring out where NaNs are coming from |
It's also a bit of a chicken and egg problem: we need one to motivate the other |
1 similar comment
It's also a bit of a chicken and egg problem: we need one to motivate the other |
You're breaking things like the compiler's nothrow modeling though, so you'll definitely get memory corruption and undefined behavior by turning this on. |
So, this would be similar to the way that force throwing Regarding |
What if you make a macro that wraps a function call, or something, that from julia itself inspects the floating point exception flags, and in the macro you throw an exception? |
Fixes #27705.
Still more to do, just want to see if it builds