-
Notifications
You must be signed in to change notification settings - Fork 355
detect Meteor Lake CPU model #247
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
Open
xujuntwt95329
wants to merge
3
commits into
pytorch:main
Choose a base branch
from
xujuntwt95329:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This should be
cpuidex(0x1A, 0)
; per page 40 of this doc, it requiresecx = 0
: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.
Theres several issues here that may take awhile to sort out
hybrid cpuid says the current core is an ecore, but not what the uarch is. It would say I am the ecore that goes with a certain pcore. A table lookup is needed to map pcores to ecores.
the cpuid is for the current thread. Its not clear we can iterate thru the cores without doing threads?
on linux you might be able to test behavior using taskset to run cpuinfo on a particular core
most devices let you disable the pcore or ecore in bios, and this will affect the cpuid. on alderlake disabling the ecore enabled avx512. the cpuid changes
on modern linux the cluster behavior has changed, and a single cluster can contain pcore and ecore. cpuinfo will copy the uarch of the first core to all the cores in the cluster.
the original meteorlake PR exposed the new cpu as meteorlake, but I think cpuinfo should expose the uarch of each core. A quick search says Raptor Lake uses a refined goldencove for pcore and gracemont ecore. I guess it would be called raptor cove, but the names no longer match the SoC. e.g. arrowlake has lioncove & skymont
an easy way to test many cpus is intel sde, but the tool does not do hybrid ecores.
Some of the ecores are available as stand alone. e.g. tremont
sde --help | grep mont
-slm Set chip-check and CPUID for Intel(R) Silvermont CPU
-glm Set chip-check and CPUID for Intel(R) Goldmont CPU
-glp Set chip-check and CPUID for Intel(R) Goldmont Plus CPU
-tnt Set chip-check and CPUID for Intel(R) Tremont CPU
On server, there is no hybrid. I expect we will see 'compact' cpus, but always 1 uarch.
e.g. granite rapids uses redwood cove
so does meteorlake. the ecore is crestmont.
It would be a good start to identify the uarch for non-hybrid at least.
I do want the hybrid feature, because on arm the little cores behave very differently, so it is worth writing differently optimized code. But we dont know that is the case for Intel hybrid.
We know amd uarch behaves differently than intel uarch, so even if your code uses the same instruction set, it can be worth identifying the uarch and using code tuned to the specific core.
At the moment, cpuinfo can detect all amd uarch, and if it is not one of those, its intel.
The behavior of lioncove on sapphire rapids matches alderlake pcore
I'm not sure if the author of this PR is still active?
I've gone ahead with a simple uarch PR for darkmont
#298
using intel sde to show that cpu-info was showing
Microarchitectures:
36x unknown
Cores:
0: 37 processors (0-36), Intel unknown
1: 1 processor (37), Intel unknown
and now shows the uarch
Microarchitectures:
36x Darkmont
Cores:
0: 37 processors (0-36), Intel Darkmont
1: 1 processor (37), Intel Darkmont
2: 1 processor (38), Intel Darkmont
showing we can do uarch for e-core and p-core, just not hybrid. But there is still value in having the uarch up to date.