This is an archive of the discontinued LLVM Phabricator instance.

[llvm-exegesis] Add pfm counters for Zen2 (znver2).
ClosedPublic

Authored by courbet on Dec 31 2019, 2:36 AM.

Diff Detail

Event Timeline

courbet created this revision.Dec 31 2019, 2:36 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 31 2019, 2:36 AM
RKSimon added a subscriber: GGanesh.

This will not work once D66088 lands - @GGanesh are you ready to commit D66088 yet?

Thanks. I'll wait for the other patch to be submitted and then change the binding.

We are checking the libpfm enablement. I can commit D66088 if we are okay without libpfm.

I take it there's no way to write a portable test for this patch? (one that doesn't have to run on the specific hardware, but still demonstrates the presence of this newly added support?)

We are checking the libpfm enablement. I can commit D66088 if we are okay without libpfm.

@GGanesh D66088 has already been accepted and (as discussed on its review) committing that straight away as a baseline makes sense, @courbet can then rebase this patch to get llvm-exegesis working with the new model and then you can further polish the model in follow up patches.

I take it there's no way to write a portable test for this patch? (one that doesn't have to run on the specific hardware, but still demonstrates the presence of this newly added support?)

You're right.

RKSimon could you please commit D66088 on my behalf. I think my github account is not added.

courbet updated this revision to Diff 239522.Jan 22 2020, 2:42 AM

Rebase after D66088.

RKSimon added inline comments.Jan 22 2020, 3:48 AM
llvm/lib/Target/X86/X86PfmCounters.td
234

typo?

courbet updated this revision to Diff 239543.Jan 22 2020, 4:23 AM
courbet marked an inline comment as done.

fix typo

llvm/lib/Target/X86/X86PfmCounters.td
234

Yes, thanks.

GGanesh added inline comments.Jan 30 2020, 12:31 AM
llvm/lib/Target/X86/X86PfmCounters.td
231

Can you please help me to comprehend this better.
Zen2 has an AGU scheduler which services the AGU pipelines.
So why are we considering only two will be able to compute load addresses?

courbet marked an inline comment as done.Jan 30 2020, 12:46 AM
courbet added inline comments.
llvm/lib/Target/X86/X86PfmCounters.td
231

I'm not familiar at all with how AMD microarchitetcures work, but from https://en.wikichip.org/wiki/amd/microarchitectures/zen_2 I understand that not all AGUs can do the same things ?

Two AGUs can generate addresses for load operations and send them to the load queue. All three AGUs can generate addresses for store operations and send them to the store queue.

GGanesh added inline comments.Jan 30 2020, 1:14 AM
llvm/lib/Target/X86/X86PfmCounters.td
231

Well! I think I need to get the wikichip URL edited. I will try to get that done.

Load and Store micro ops are sent to one 28-entry address generation unit (AGU) scheduler. There are 3 AGUs for all load and store address generation.

courbet updated this revision to Diff 241368.Jan 30 2020, 1:22 AM

Remove FIXME as per the explanations from GGanesh@.

OK, thanks for the clarification !

Good with me! I am have moved some stones to get the wikichip URL updated.

This revision was not accepted when it landed; it landed in state Needs Review.Feb 3 2020, 1:59 AM
This revision was automatically updated to reflect the committed changes.