-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Support AVX-512 builds on Windows #15159
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
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>
The problem is that |
I can't help with Windows, but what CPU are you using? |
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
|
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. |
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? |
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) |
I have no experience with Intel SDE, so I can't provide any helpful comments. A nightly build for this seems reasonable. |
Thanks for mentioning that! I have now forwarded to #13296 (comment). |
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: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
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 -i
can be run. Coreinfo reports here:I'll look into this.