-
-
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
Complex signed NaN test fails on Darwin/Aarch64 #38419
Comments
In particular zero_subnormals is also on on this platform, so we should decide if that's what we want. |
Or maybe we want to turn on zero_subnormals by default everywhere, since that's where things seem to be going. |
Wait what? Is zeroing subnormals even ieee 704 compliant? |
No, it isn't, but subnormals are hard to handle and cost 100-1000x as much as regular operations on modern hardware, so most ISAs not have a bit you can flip to zero them and not pay the cost. It's off by default on Aarch64 linux, so maybe we should just turn it off on Darwin also, but I figured it'd be worth taking an explicit call on that. |
Note that removing subnormals breaks error compensation, and most of the theorems about floating point arithmetic |
I guess the safe thing for now is just to turn off the fast flags, and maybe later we can add them back together with a nicer API for actually using them. We do support changing the flag right now (even on x86), but the compiler doesn't actually respect it, so it doesn't really work. |
In #38419 we noticed that on AArch64 Darwin, processes start with the FZ and DN floating point flags set. To maintain consistency across platforms, reset these flags whenever we start julia. Not that default_nans isn't available on x86, so while we do have julia-level wrappers for the fz flag, I'm not adding any for the dn flag. The function is exported, so if somebody really needs it in some aarch64-specific code, they can ccall it.
In #38419 we noticed that on AArch64 Darwin, processes start with the FZ and DN floating point flags set. To maintain consistency across platforms, reset these flags whenever we start julia. Not that default_nans isn't available on x86, so while we do have julia-level wrappers for the fz flag, I'm not adding any for the dn flag. The function is exported, so if somebody really needs it in some aarch64-specific code, they can ccall it.
In #38419 we noticed that on AArch64 Darwin, processes start with the FZ and DN floating point flags set. To maintain consistency across platforms, reset these flags whenever we start julia. Not that default_nans isn't available on x86, so while we do have julia-level wrappers for the fz flag, I'm not adding any for the dn flag. The function is exported, so if somebody really needs it in some aarch64-specific code, they can ccall it.
In #38419 we noticed that on AArch64 Darwin, processes start with the FZ and DN floating point flags set. To maintain consistency across platforms, reset these flags whenever we start julia. Not that default_nans isn't available on x86, so while we do have julia-level wrappers for the fz flag, I'm not adding any for the dn flag. The function is exported, so if somebody really needs it in some aarch64-specific code, they can ccall it.
The reason for this seems to be that Apple turns on the
RunFast
flag, which normalizes away the sign bit of the NaN on certain operations. The question is to what extent we want to allow that or do we need to turn offRunFast
or adjust the test or one of the implementations? Note that these tests do pass for Float64, only Float32 is at issue.cc @stevengj
The text was updated successfully, but these errors were encountered: