Skip to content
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

AMD family 25, model 8 support #624

Open
sgaure opened this issue May 31, 2024 · 8 comments
Open

AMD family 25, model 8 support #624

sgaure opened this issue May 31, 2024 · 8 comments

Comments

@sgaure
Copy link

sgaure commented May 31, 2024

This is my desktop computer, and I would very much like to be able to profile programs I write.
From /proc/cpuinfo:

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 25
model           : 8
model name      : AMD Ryzen Threadripper PRO 5945WX 12-Cores
stepping        : 2
microcode       : 0xa008204
$ cat /etc/issue
Ubuntu 24.04 LTS
$ likwid-perfctr --version
likwid-perfctr -- Version 5.3.0 (commit: f92b13ae2203b13e045ef704214820536f6e534e)
$ sudo likwid-perfctr -g CLOCK /bin/ls
--------------------------------------------------------------------------------
CPU name:       AMD Ryzen Threadripper PRO 5945WX 12-Cores     
CPU type:       nil
CPU clock:      4.09 GHz
ERROR - [/src/likwid/src/perfmon.c:perfmon_init_maps:1300] Unsupported AMD Zen Processor
ERROR - [/src/likwid/src/perfmon.c:perfmon_init:2111] No such file or directory.
Failed to initialize event and counter lists for (null)

Linux perf runs fine, so I suppose the counters are documented.

$ perf stat /bin/true

 Performance counter stats for '/bin/true':

              0,77 msec task-clock                       #    0,076 CPUs utilized             
                 1      context-switches                 #    1,306 K/sec                     
                 0      cpu-migrations                   #    0,000 /sec                      
                54      page-faults                      #   70,522 K/sec                     
         1 397 408      cycles                           #    1,825 GHz                       
             8 617      stalled-cycles-frontend          #    0,62% frontend cycles idle      
           228 054      stalled-cycles-backend           #   16,32% backend cycles idle       
         1 138 743      instructions                     #    0,81  insn per cycle            
                                                  #    0,20  stalled cycles per insn   
           242 850      branches                         #  317,154 M/sec                     
            30 552      branch-misses                    #   12,58% of all branches           

       0,010068794 seconds time elapsed

       0,000772000 seconds user
       0,000772000 seconds sys

@TomTheBear
Copy link
Member

Please try out the attached PR. It should work for your system but there could be minor differences to the general Zen4 Ryzen or Epyc variants.

@sgaure
Copy link
Author

sgaure commented Jun 1, 2024

Ah, unexpectedly I'm away from office for some weeks. I can't try it out in a few weeks.

@sgaure
Copy link
Author

sgaure commented Jun 3, 2024

I got around for a short test. Seems ok. For the groups I get some warnings.

$ sudo likwid-perfctr -f -C 0 -g CACHE /bin/true
WARN: Event DATA_CACHE_REFILLS_ALL not found for current architecture
$ sudo likwid-perfctr -f -C 0 -g L3CACHE /bin/true
WARN: Event L3_CACHE_REQ not found for current architecture
WARN: Event L3_MISS_REQ not found for current architecture
WARN: Event L3_CACHE_REQ_MISS not found for current architecture

@TomTheBear
Copy link
Member

Please run likwid-perfctr -V 3 -e. There might be multiple reasons for this behavior.

@sgaure
Copy link
Author

sgaure commented Jun 3, 2024

likwid.txt

@TomTheBear
Copy link
Member

I copied the groups over from Zen3 and never updated these groups to use the Zen4 events. So this is a general Zen4 issue. I updated the PR.

@sgaure
Copy link
Author

sgaure commented Jun 3, 2024

Seems ok now. There are some warnings for the NUMA group, but there's only one NUMA domain, so not very interesting. (DATA_CACHE_REFILLS_LOCAL_ALL and DATA_CACHE_REFILLS_REMOTE_ALL).

@TomTheBear
Copy link
Member

Same issue, I updated it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants