Skip to content
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

Relax fma check in configure for Visual Studio #12518

Merged
merged 1 commit into from Mar 6, 2024
Merged

Conversation

dra27
Copy link
Member

@dra27 dra27 commented Aug 31, 2023

In #944, Visual Studio 2019 onwards is assumed by configure to have a working fma function, and it's a hard error if it fails the checks for it. This assumption is not quite correct - Visual Studio 2019 in fact fixed the use of hardware fma support, not the software version of the function. If that hardware support is unavailable, the same broken fallback function is used.

Fixes #12513 (NB this is for 4.14, as this only affects MSVC; see also #12519 for trunk)

@shindere
Copy link
Contributor

I am going to approve this PR because the code seems definitely correct to
me.

I just have one question about a comment:

I am unsure how to understand "broken implementations of Cygwin64, mingw-w64 (x86_64) Visual
Studio". Can you either explain here or, if you thiink it's worth it,
clarify the comment?

@dra27
Copy link
Member Author

dra27 commented Sep 17, 2023

I am unsure how to understand "broken implementations of Cygwin64, mingw-w64 (x86_64) Visual Studio". Can you either explain here or, if you thiink it's worth it, clarify the comment?

It needs the context of the line before! "These tests trigger the broken implementations of ..." - one or more of those three tests (from testsuite/tests/fma/fma.ml) is known to fail on each of those broken implementations.

Changes Outdated Show resolved Hide resolved
Visual Studio 2019 onwards is assumed by configure to have a working
`fma`. This assumption was not quite correct - Visual Studio 2019 in
fact fixed the use of hardware fma support. If that is unavailable, the
same broken fallback function is used.
@dra27
Copy link
Member Author

dra27 commented Mar 5, 2024

This is macOS's last chance in CI - if the beat test fails again, we should disable it (as on trunk)

@Octachron Octachron merged commit 863b9de into ocaml:4.14 Mar 6, 2024
7 of 8 checks passed
@Octachron
Copy link
Member

It does seem better to also disable beat.ml on 4.14.

@dra27 dra27 deleted the fma-4.14 branch March 6, 2024 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make --enable-imprecise-c99-float-ops the default on CPU that doesn't support FMA
4 participants