Uh oh!
There was an error while loading. Please reload this page.
Support AVX-512 builds on Windows - #15159
Conversation
"Since limited support for `/arch:AVX512` was added in Visual Studio 2017, and expanded in Visual Studio 2019"[1], we can safely offer this option, since PHP 8.4 is supposed to build with Visual Studio 2022, and it is unlikely that someone tries to build PHP 8.4 with Visual Studio, requesting AVX-512 support. [1] <https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170>
cmb69
commented
Jul 29, 2024
The problem is that |
TimWolla
commented
Jul 29, 2024
I can't help with Windows, but what CPU are you using? |
cmb69
commented
Jul 29, 2024
It's an AMD Ryzen 5 2400G. Actually, I was surprised that it supported AVX-512, but, hey, would have been cool. :) And to clarify, the issue had nothing to do with PHP's AVX-512 support, but rather is due to compile time optimization of Line 62 in 9083ce4 |
Disservin
commented
Aug 2, 2024
I think some runners have avx512 but this isn't stable. Rather what one should do is use https://github.com/petarpetrovt/setup-sde and use the sde to emulate it. It's been great for testing avx512 builds. |
cmb69
commented
Aug 7, 2024
Interesting, thanks! I assume that the tests runs would be rather slow, so likely something for nightly builds only. And it may make more sense to use that for a Linux build, given that the official Windows binaries are still restricted to SSE2. @iluuu1994, what do you think? |
Disservin
commented
Aug 7, 2024
in my CI it seems to be twice as slow as the avx2 build Are you aware that this currently fails because of missing gh command? (not sure what caddy is used for) |
iluuu1994
commented
Aug 8, 2024
I have no experience with Intel SDE, so I can't provide any helpful comments. A nightly build for this seems reasonable. |
cmb69
commented
Aug 21, 2024
Thanks for mentioning that! I have now forwarded to #13296 (comment). |
cmb69
commented
Aug 22, 2024
I have filed #15540 as separate ticket, and going to merge this soon; doesn't make sense to not enable explicit support for AVX-512 while we already support dynamic AVX-512 detection (and to my knowledge there is no code which only supports compile time AVX-512 in php-src). |
"Since limited support for
/arch:AVX512was added in Visual Studio 2017, and expanded in Visual Studio 2019"[1], we can safely offer this option, since PHP 8.4 is supposed to build with Visual Studio 2022, and it is unlikely that someone tries to build PHP 8.4 with Visual Studio, requesting AVX-512 support.[1] https://learn.microsoft.com/en-us/cpp/build/reference/arch-x64?view=msvc-170
Note that this merely enables people to build for AVX-512; it doesn't change the default (that is still used for official Windows builds), nor does it update CI (which uses AVX2; I don't think AVX-512 is supported on hosted GH runners).
Also note that a full PHP build for AVX-512 succeeded, but apparently not even
php -ican be run. Coreinfo reports here:I'll look into this.