Hi all,

First, let me thank you for this project. Awesome!

We've been playing with /libpfm4/ these days, but couldn't get it working on our 2 *AMD ZEN3* CPUs.

I pasted their specifications as given by /PAPI/ below.

We think the problem with /libpfm4/ in our case is that in the function *amd64_get_revision* (in /lib/pfmlib_amd64.c/), there is a switch over the /model/, and only model /1/ is supported while our CPUs showcase model /80/ and /33/.

We can propose the following patch, but we don't know if this is the right fix, or if there is a specific reason why only model /1/ is supported.

What do you think?

Many thanks in advance,

Romin

diff --git a/lib/pfmlib_amd64.c b/lib/pfmlib_amd64.c
index 8e07525..b60b362 100644
--- a/lib/pfmlib_amd64.c
+++ b/lib/pfmlib_amd64.c
@@ -182,11 +182,13 @@ amd64_get_revision(pfm_amd64_config_t *cfg)
rev = PFM_PMU_AMD64_FAM16H;
} else if (cfg->family == 25) { /* family 19h */
switch (cfg->model) {
- case 1:
+ case 1:
+ case 33:
+ case 80:
rev = PFM_PMU_AMD64_FAM19H_ZEN3;
- break;
- default:
- ;
+ break;
+ default:
+ break;
}
}

Available components and hardware information.
--------------------------------------------------------------------------------
PAPI version             : 6.0.0.1
Operating system         : Linux 5.15.0-52-generic
Vendor string and code   : AuthenticAMD (2, 0x2)
Model string and code    : AMD Ryzen 7 5800H with Radeon Graphics (80, 0x50)
CPU revision             : 0.000000
CPUID                    : Family/Model/Stepping 25/80/0, 0x19/0x50/0x00
CPU Max MHz              : 4463
CPU Min MHz              : 400
Total cores              : 16
SMT threads per core     : 2
Cores per socket         : 8
Sockets                  : 1
Cores per NUMA region    : 16
NUMA regions             : 1
Running in a VM          : no
Number Hardware Counters : 0
Max Multiplex Counters   : 384
Fast counter read (rdpmc): no


Available components and hardware information.
--------------------------------------------------------------------------------
PAPI version             : 6.0.0.1
Operating system         : Linux 5.15.0-46-generic
Vendor string and code   : AuthenticAMD (2, 0x2)
Model string and code    : AMD Ryzen 9 5950X 16-Core Processor (33, 0x21)
CPU revision             : 0.000000
CPUID                    : Family/Model/Stepping 25/33/0, 0x19/0x21/0x00
CPU Max MHz              : 5083
CPU Min MHz              : 2200
Total cores              : 32
SMT threads per core     : 2
Cores per socket         : 16
Sockets                  : 1
Cores per NUMA region    : 32
NUMA regions             : 1
Running in a VM          : no
Number Hardware Counters : 0
Max Multiplex Counters   : 384
Fast counter read (rdpmc): yes
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to