-
Notifications
You must be signed in to change notification settings - Fork 18k
x/sys/cpu: add support for detecting AVX-512 #41288
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
Comments
A patch would be great, thanks. |
@fuzxxl Hi, if you will change your mind about doing it by yourself - plz ping me, I will handle this. |
@justplesh If you would like to do this I would be very happy. Gives me more time to spend writing my paper. |
@clausecker ok, so I'll work on this |
@justplesh Any progress on this one? |
@clausecker will start in a few days |
@justplesh If it's in more than week, I think I'll just do it myself. I have been holding up writing AVX-512 code for two weeks now and would like to begin soon-ish. |
@clausecker I'll try this weekend |
Change https://golang.org/cl/257937 mentions this issue: |
@clausecker so, I've implemented the patch, hopefully, it will be merged soon |
Note that osxsave needs to be checked and zmm register support (similar to avx and ymm registers) before allowing use of AVX-512. |
If I understood correctly, we can just check if AVX is supported. As it is already checked :) |
The current code does not check xgetbv for zmm and opmask support which i think is needed for safe use. The avx code only checks xmm and ymm support in the os which is not sufficient to make sure the os correctly handles zmm state save and restore. |
Yep, you are right. Will handle it. |
Thank you for the patch! This'll be very useful. |
No problem :) Will be happy to work on the next issues! |
I would like to detect the availability of AVX-512 and its subsets (F, CD, VL, BW, DQ, IFMA, VBMI, ...) using the
golang.org/x/sys/cpu
package. However, no such flags are available. Please add a way to detect the availability of AVX-512 and its specific sub features. If desired, I can try writing a patch for this myself.The text was updated successfully, but these errors were encountered: