-
-
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
Math tests: if fma is not available, relax some tests from exact equality to approximate equality #48102
Conversation
…lity to approximate equality
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
IIRC julia> f() = Core.Compiler.have_fma(Float64)
f (generic function with 1 method)
julia> f()
true
julia> Core.Compiler.have_fma(Float64)
false |
# If the machine supports fma (fused multiply add), we require exact equality. | ||
# Otherwise, we only require approximate equality. | ||
if has_fma[T] | ||
my_eq = (==) |
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.
Could use a different infix comparison operator to make this look nicer.
Would it be slicker to have and overloaded infix operator here that chooses |
This appears to fix one Windows, and I just triggered a re-run for the other given it appeared to be a httpbingo blip. If that succeeds and the suggested change above isn't imminent, it might be worth merging this as-is to get CI green again? |
httpbingo fail is still there, plus a few others. Also, windows tests reports are so noisy.. |
At least it fixes Let's merge this so at least that platform will be green on master. And we can implement the above-discussed improvements in a follow-up PR. |
…lity to approximate equality (#48102) * Math tests: if fma is not available, relax some tests from exact equality to approximate equality * Apply suggestions from code review Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com> * `has_fma` has no runtime support * Add `Rational{Int}` * Put the FMA support info in the testset context * Fix whitespace * Remove inaccurate testset name Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com> (cherry picked from commit 6d14b0f)
Ref #48101