This is an archive of the discontinued LLVM Phabricator instance.

[X86] Add missing Zen3 model subtypes
ClosedPublic

Authored by RKSimon on Nov 9 2022, 12:34 AM.

Details

Diff Detail

Event Timeline

RKSimon created this revision.Nov 9 2022, 12:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 9 2022, 12:34 AM
RKSimon requested review of this revision.Nov 9 2022, 12:34 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptNov 9 2022, 12:34 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
FreddyYe added inline comments.Nov 9 2022, 1:27 AM
compiler-rt/lib/builtins/cpu_model.c
630

Where can we find the Model values? Meanwhile I cannot find the new condition in gcc's codes either.

RKSimon added a subscriber: GGanesh.

CC'ing @GGanesh who might might be able to suggest where we can get further references.

compiler-rt/lib/builtins/cpu_model.c
630

AMD are really slow at providing this kind of documentation and its a mess - there is a reference to Fam19h-51h at https://www.amd.com/en/support/tech-docs?keyword=19h but not the rest of the range.

As I said in the summary I took the CPUIDs that have been seen by InstLatx64 and mapped those to the linux kernel code for confirmation - the best you can then do is look at the git history of the file to see when those cases were added, at least some of those change came from the AMD kernel team.

gcc might not have bothered as zen3+ is really just changes to IGPU and cache, not the ISA feature/tuning set.

@lebedev.ri Might be able to give a little more insight - I based this change off his previous patch for additional zen3 models: D121708

The following are the AMD Zen3 models.

Family 19h Models 00h-0Fh - Zen3
Family 19h Models 20h-2Fh - Zen3
Family 19h Models 30h-3Fh - Zen3
Family 19h Models 40h-4Fh - Zen3
Family 19h Models 50h-5Fh - Zen3

You need to exclude 10h-1Fh

RKSimon updated this revision to Diff 474338.Nov 9 2022, 1:22 PM
RKSimon retitled this revision from [X86] Add missing Zen3+ model subtypes to [X86] Add missing Zen3 model subtypes.
RKSimon edited the summary of this revision. (Show Details)
lebedev.ri accepted this revision.Nov 9 2022, 1:25 PM
This revision is now accepted and ready to land.Nov 9 2022, 1:25 PM
FreddyYe added inline comments.Nov 9 2022, 5:54 PM
compiler-rt/lib/builtins/cpu_model.c
630

Thanks for your detailed explaining!

This revision was landed with ongoing or failed builds.Nov 10 2022, 2:36 AM
This revision was automatically updated to reflect the committed changes.