Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork10.9k
MNT: Update windows-2019 to windows-2022[wheel build]#28955
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
close/reopen |
Put a triage label on this, as the deadline is coming up and there are problems. |
@h-vetinari Ping, because ISTR that you were involved last time we updated the windows version. |
The failures seem to mostly come from |
charris commentedMay 26, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
Thanks for the ping. The only place where this really becomes relevant is for linking to Given that VS2019 is EOL for over a year, and that VS2022 is an ABI-compatible update, this should not be an undue burden. The timing matches well, I've just picked up theproposal to move to VS2022 in conda-forge again. |
Isn't this snippet meant to make a Lines 569 to 577 in3c995e7
|
Maybe related to#29039 which updates OpenBLAS |
Not AFAIU. That's about reusing/sharing the objects in the static library between MSVC and mingw, and thecomment from the upstream devs at the time was
The virality of the msvc toolset concerns being able to link to something built with VS2022 (which - at least on paper - then also requires VS2022) |
Rather than latest, it would be better to explicitly use vs2022. |
@seiko2plus The |
Agreed, which means we need to update to the 2022 image in SciPy first before merging this. We should probably do that asap and then merge this and backport it to the 2.3.x branch. before releasing 2.3.0. Otherwise it'll become a potentially risky change in 2.3.1 or 2.3.2. |
8aa40c7
to75079b9
Compare75079b9
to755cc38
CompareLook like i need to skip spacing test for window |
087ca33
tof33423f
Compareabhishek-iitmadras commentedJun 1, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Windows Server 2019: Uses older MSVC that generates FMA contractions by default This change significantly affects floating-point precision, especially for transcendental functions So we need to add the /fp:contract flag to MSVC builds. |
Note that meson shows FMA3 enabled, but evidently a flag is required for msvc in vs2022. I'm not clear on whether meson should handle that or not. Unfortunately, the |
.github/workflows/windows.yml Outdated
@@ -119,7 +119,7 @@ jobs: | |||
-name:Build and install | |||
run:| | |||
python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true" | |||
python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true" -Csetup-args="-Dc_args=/fp:contract" -Csetup-args="-Dcpp_args=/fp:contract" |
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.
This would read better with a line continuation\
to break the line. Probably for the previous use as well.
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.
This should be part of the meson flags when building SIMD code. I suggest moving it here:
numpy/meson_cpu/x86/meson.build
Line 214 inb353a18
FMA3.update(args: {'val':'/arch:AVX2','match': clear_arch}) |
if (ufunc == np.spacing and | ||
platform.system() == 'Windows' and | ||
any(np.isnan(d) if isinstance(d, (int, float)) else False for d in data)): | ||
pytest.skip("spacing with NaN generates warnings on Windows/VS2022") |
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.
This seems overly precise given the rather broad skip the original author used and the FIXME. I'd just treatnp.spacing
andnp.ceil
separately.
@seiko2plus knows more exactly where it goes, but I'm pretty it's in the |
Can we run wheel builder CI on this patch? |
charris commentedJun 2, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Append |
f33423f
to747e668
Compare.github/workflows/windows.yml Outdated
@@ -119,7 +119,7 @@ jobs: | |||
-name:Build and install | |||
run:| | |||
python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true" | |||
python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true" -Csetup-args="-Dc_args=/fp:contract" -Csetup-args="-Dcpp_args=/fp:contract" |
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.
This should be part of the meson flags when building SIMD code. I suggest moving it here:
numpy/meson_cpu/x86/meson.build
Line 214 inb353a18
FMA3.update(args: {'val':'/arch:AVX2','match': clear_arch}) |
Note that /fp:contract is not supported MSVC < 19.14 |
Should be fine, since our minimum supported version is 19.20: Lines 30 to 33 inb353a18
|
747e668
to3dcd6f8
Compare.github/workflows/wheels.yml Outdated
# Add compiler flags for 32-bit builds | ||
if ("${{ matrix.buildplat[1] }}" -eq "win32") { | ||
echo 'CIBW_CONFIG_SETTINGS=setup-args=-Dc_args="/fp:contract" setup-args=-Dcpp_args="/fp:contract"' >> $env:GITHUB_ENV | ||
} |
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.
The extra flags should not be required after updatingmeson_cpu
.
You need to do the update this way:
|
abhishek-iitmadras commentedJun 2, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
isn't it overriding the args for FMA3 ?Correct me if i am wrong |
654c62e
to4a09c91
Compareabhishek-iitmadras commentedJun 2, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Please have a review to this patch. |
meson_cpu/x86/meson.build Outdated
# Add floating-point contract flag for 32-bit builds | ||
# Fixes transcendental function accuracy on Windows Server 2022 | ||
if cpu_family=='x86' |
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.
This file is already undermeson_cpu/x86/meson.build
, you don't need the if condition here.
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.
Don't we need the flag for 64-bit as well?
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.
Don't we need the flag for 64-bit as well?
It doesn't seem required by us, but we probably do want it.
#29116 is working now. There is a bogus circleci failure that can be ignored. I'm curious if@r-devulap suggestion of putting the args in a list works. |
The PyPy failure can be ignored. |
381fb87
to3a5335f
CompareCo-authored-by: Charles Harris <charlesr.harris@gmail.com>
3a5335f
to4490065
Compare@rgommers@charris@r-devulap |
Uh oh!
There was an error while loading.Please reload this page.
As per info in :actions/runner-images#12045
We need to change window runner.