Skip to content
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

Add CPU family/model information as a top level attribute #85

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alalazo
Copy link
Member

@alalazo alalazo commented Feb 14, 2024

In this PR we introduce a top-level attribute with mappings from CPU family/model numbers to the corresponding microarchitecture names. At the moment this is a prototype to showcase a possible enhancement of the detection algorithm on x86_64 processors.

If the approach seems ok, then we need to add the remaining data points from https://en.wikichip.org/wiki/intel/cpuid and https://en.wikichip.org/wiki/amd/cpuid

@alalazo alalazo closed this Feb 14, 2024
@alalazo alalazo reopened this Feb 14, 2024
@boegel
Copy link
Member

boegel commented Feb 14, 2024

https://en.wikichip.org/wiki/intel/cpuid shows that you can't distinguish between Skylake (Server), Cascade Lake, and Cooper Lake based on family/model info, so I'm not sure how that's going to work out, since there's a difference in supported instructions (like avx512ifma supported by Cooper Lake + Cascade Lake, but not Skylake, and avx512_vnni supported by Cascade Lake but not Cooper Lake & Skylake)...

@alalazo
Copy link
Member Author

alalazo commented Feb 14, 2024

The idea is to prefilter the architectures we check for compatibility. Not sure it's worth merging this change, but I wanted to write the draft idea somewhere since on icelake I got a 3x speed-up on detection.

@alalazo alalazo changed the title Add a new top level attribute Add CPU family/model information as a top level attribute Feb 14, 2024
Comment on lines +3469 to +3473
{
"family": "6",
"model": "46",
"uarch": "nehalem"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should check the vendor (GenuineIntel) as well.

Copy link
Member Author

@alalazo alalazo Feb 14, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isuruf Out of curiosity, do you know of any CPU that needs to be disambiguated by vendor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants