-
Notifications
You must be signed in to change notification settings - Fork 328
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
Added changes to cpuinfo.h, isa.c and isa-info.c #269
base: main
Are you sure you want to change the base?
Conversation
detect AVX10.1 ISA
Hi @rrwinterton! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
src/x86/isa.c
Outdated
/* | ||
* AVX 10.1 instructions: | ||
*/ | ||
isa.avx10_1 = (structured_feature_info1.edx & UINT32_C(1 << 19)); |
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.
refer a UINT32_C constant like the others
Replace UINT32_C(1 << 19)
with UINT32_C(0x00080000)
To confirm the bits, I look at libyuv AVX10 support
It is in the same register as avxvnniint8
((cpu_einfo7[3] & 0x00000010) ? kCpuHasAVXVNNIINT8 : 0);
((cpu_einfo7[3] & 0x00080000) ? kCpuHasAVX10 : 0)
It looks right except in libyuv it checks for if ((GetXCR0() & 0xe0) == 0xe0) which says the OS supports saving ymm16 to ymm31.
So I think you should also check avx512_regs &&
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 reason I didn't check for AVX512 is because in the future there may not be 512 on some systems that support AVX10.2 in 256 bit form but that is still TBD. I think it is a good idea for now since we can change this in the future if this is the case.
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |
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.
Comment about other avx10 is not needed and subject to change.
The 'avx512 registers' is a misnomer. The OSS indicates the OS supports saving 32 vector registers.
detect AVX10.1 ISA