-
Notifications
You must be signed in to change notification settings - Fork 266
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
detect AVX-512 FMA count #125
Conversation
The information contained in this commit was obtained from "Intel® Architecture Instruction Set Extensions and Future Features Programming Reference" document 319433-040 from https://software.intel.com/content/www/us/en/develop/download/intel-architecture-instruction-set-extensions-programming-reference.html Signed-off-by: Jeff Hammond <jeff.r.hammond@intel.com>
Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>
Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>
Signed-off-by: Jeff Hammond <jeff.r.hammond@intel.com>
Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>
1) remove debug stuff 2) remove ICX - will add details when available Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>
Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>
@jeffhammond Can I ask you to resolve the conflicts? |
Yeah, they should be resolved now. Git struggles with the diamond dependency... |
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.
Thx a lot @jeffhammond for the PRs. I really appreciate it.
src/cpuinfo_x86.c
Outdated
char proc_name[49] = {0}; | ||
FillX86BrandString(proc_name); | ||
// detect Xeon | ||
if (proc_name[9]=='X') { |
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.
Is testing individual character the official way? It feels like upcoming names could match and trigger false positives.
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.
All of this code is within the model==0x55
conditional so it is not vulnerable to future branding changes unless they were based on the Skylake Server microarchitecture, which seems exceedingly unlikely.
In C++ implementations of this code, I do substring matching but in the C versions I just test single characters since I believe I have complete knowledge of the relevant processor names (including off-roadmap ones), in which case it should be sufficient.
Would you prefer I test multiple characters directly (test for 'X', 'e', 'o', 'n' not just 'X'), use strncmp
, or use strstr
? I generally avoid the latter since it doesn't have an n
version.
Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>
Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>
Signed-off-by: Hammond, Jeff R <jeff.r.hammond@intel.com>
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.
Yeah sorry about the "larger scale change", I'll try to add a check so people can only submit well formatted patches in the future.
Thank you for bearing with me.
This change adds support for a virtual CPUID bit called "secondFMA", which indicates whether an Intel Xeon processor has a second FMA unit. This detection is based upon the processor name, which is the best known method. It should be correct for all documented SKUs as well as most other instances, although it is impossible for me to verify on all of them, although we have a bit of experience testing SKUs already in the BLIS project.