PAPI on Alder Lake?

267 views
Skip to first unread message

Rongcui

unread,
Dec 5, 2023, 2:01:30 PM12/5/23
to ptools-perfapi
I am trying to use PAPI on an Intel i9-12900 CPU. However, PAPI doesn't seem to detect performance counters:

Compiled-in components:
Name:   perf_event              Linux perf_event CPU counters
   \-> Disabled: Error libpfm4 no PMUs found
Name:   perf_event_uncore       Linux perf_event CPU uncore and northbridge
   \-> Disabled: No uncore PMUs or events found

Is the architecture not supported yet?

Thank you.

Giuseppe Congiu

unread,
Dec 5, 2023, 2:17:28 PM12/5/23
to Rongcui, ptools-perfapi
It looks like Alder Lake's PMU is not supported by libpfm4

--
You received this message because you are subscribed to the Google Groups "ptools-perfapi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ptools-perfap...@icl.utk.edu.
To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/48134917-7287-47b8-8dae-9e24003cf18bn%40icl.utk.edu.

Rongcui

unread,
Dec 5, 2023, 2:33:01 PM12/5/23
to ptools-perfapi, gco...@icl.utk.edu, ptools-perfapi, Rongcui

Do you know anyway to circumvent this? I currently have a program using the high level interface, which fails because of the missing components (error -25). Is there some way I can "shim" the library by specifying raw counters? Or do I have to wait for libpfm4 to update?

Giuseppe Congiu

unread,
Dec 5, 2023, 2:48:38 PM12/5/23
to Rongcui, ptools-perfapi
If you run "perf list" do you get any events?

Rongcui

unread,
Dec 6, 2023, 3:34:50 PM12/6/23
to ptools-perfapi, gco...@icl.utk.edu, ptools-perfapi, Rongcui
There are quite a few, including pre-defined, cpu_atom, cpu_core, cache, etc. Perf seems to collect counters fine, but PAPI doesn't.

Giuseppe Congiu

unread,
Dec 6, 2023, 3:40:44 PM12/6/23
to Rongcui, ptools-perfapi
I think that is to “blame” on libpfm4. PAPI gets all the CPU events from libpfm4. Apparently, Alder Lake also seems to be problematic when it comes to hardware counters as reported in the following post:


At this point I would not know how to proceed. Perhaps the best course of action is to contact the libpfm4 maintainer and see if he can help providing support for Alder Lake.

Sorry I can’t be of more help.

Best,
Giuseppe

Stephane Eranian

unread,
Dec 7, 2023, 1:50:39 PM12/7/23
to Giuseppe Congiu, Rongcui, ptools-perfapi
Hi,

I have now coded most of the Alderlake support which should also
enable RaptorLake.
I will try to push the updates before the end of the month.
Thanks.
> To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/009B5700-BCD3-4AC9-B8B4-73A03B521E60%40icl.utk.edu.

Stephane Eranian

unread,
Mar 7, 2024, 4:08:21 AM3/7/24
to Anuraag Nandi, ptools-perfapi, Rongcui, Giuseppe Congiu
On Wed, Mar 6, 2024 at 10:39 PM Anuraag Nandi <nandia...@gmail.com> wrote:
>
> Hi, I was trying to use PAPI on rocketlake and it is stiil not working, can I know if you pushed the code?
>
The libpfm4 was pushed several days ago. I don't know the PAPI situation.

> thanks
> Anuraag

Heike Jagode

unread,
Mar 7, 2024, 10:38:53 AM3/7/24
to era...@gmail.com, Anuraag Nandi, ptools-perfapi, Rongcui, Giuseppe Congiu
Anuraag,

What does 'it' refer to in your sentence? Are you able to configure and install PAPI? If so, could you provide the outputs from the PAPI utilities 'papi_component_avail' and 'papi_native_avail'?

Thanks,
Heike




--
__________________________________________
Heike Jagode, Ph.D., Research Associate Professor
Innovative Computing Laboratory (ICL)
University of Tennessee Knoxville
http://icl.utk.edu/~jagode/

Vince Weaver

unread,
Mar 7, 2024, 10:50:38 AM3/7/24
to Heike Jagode, era...@gmail.com, Anuraag Nandi, ptools-perfapi, Rongcui, Giuseppe Congiu

even though libpfm4 support for raptorlake is in, I don't think
papi_events.csv has been updated yet for cascade lake (csl), alder lake,
or raptor lake yet.

Raptorlake (and probably alderlake too) has an additional problem where
currently PAPI will only report for the P (power) cores. I'm working on
getting support in so we can also measure on the E (efficiency) cores.

Vince
> > https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/009B5700-BCD3-4AC9-B8B4-73A03B521E60%40icl.utk.edu
> > .
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "ptools-perfapi" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to ptools-perfap...@icl.utk.edu.
> > To view this discussion on the web visit
> > https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/CAMsRxfKT4eGcn59UZP5kyjds2TxL38Ng-it6-yNDQW97QGbOww%40mail.gmail.com
> > .
> >
>
>
> --
> __________________________________________
> Heike Jagode, Ph.D., Research Associate Professor
> Innovative Computing Laboratory (ICL)
> University of Tennessee Knoxville
> http://icl.utk.edu/~jagode/
>
> --
> You received this message because you are subscribed to the Google Groups "ptools-perfapi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ptools-perfap...@icl.utk.edu.
> To view this discussion on the web visit https://groups.google.com/a/icl.utk.edu/d/msgid/ptools-perfapi/CAAMW9zDj9v1ccUNCSGHoTd39SFS9VEzB2igKynX0geLi0f%2Bw3w%40mail.gmail.com.
>

Vince Weaver

unread,
Mar 8, 2024, 1:12:20 AM3/8/24
to Vince Weaver, Heike Jagode, Stephane Eranian, Anuraag Nandi, ptools-perfapi, Rongcui, Giuseppe Congiu

Further investigating this on a Raptor Lake machine, it turns out the
problem is PAPI will get confused in pe_libpfm4_events.c if more
than one PFM_PMU_TYPE_CORE pmu is found.

If you comment out the "return PAPI_ECOUNT" error, papi will return native
events fine, but due to the probing order will treat the E-core (adl_grt)
cores as the default pmu and the P-cores as a secondary one. Which is
probaly the opposite of the default we want but not sure if there's a good
way to fix that without hard-coding the pmu names in there (though maybe
we already do something similar for zen1).

That could maybe be an OK short term fix.

A longer term issue is how to handle things like PAPI_TOT_CYC on a machine
with both P and E cores. Should it be a derived event that adds up the P
and E cycle counts?

Vince

and of course in the previous message I meant ice lake (icl) there, not
cascade lake. too many lakes in intel chips.
Vince Weaver
vincent...@maine.edu
Associate Professor, Electrical and Computer Engineering
http://web.eece.maine.edu/~vweaver/
Reply all
Reply to author
Forward
0 new messages