Command Line Options - Command Line Options - 57368

uProf User Guide

Document_ID
57368
Release_Date
2025-06-09
Revision
5.1 English
Generating the roofline chart of an application:
  1. Collect and generate roofline HTML plot using AMDuProfPcm.
    $ AMDuProfPcm roofline -O /tmp -- /tmp/myapp.exe

    An output directory is created in the specified dir (/tmp) in the format AMDuProfPcm-Roofline-<date>-<time> which contains the HTML report (report.html). Open the HTML report and view the roofline graph located in the β€œβ€ tab.

    On AMD β€œZen 4” and later processors, if the Linux kernel version doesn't support accessing DF counters, use the following command with root privilege
    $ AMDuProfPcm roofline --msr -O /tmp/ -- /tmp/myapp.exe
  2. To generate the PDF roofline chart, run the following command (to be deprecated).
    $ AMDuProfModelling.py -i /tmp/myapp-roofline.csv -o /tmp/ --memspeed 3200 -a myapp

    The roofline chart is saved in the file /tmp/AMDuProf_roofline-yyyy-mm-dd-hhmmss.pdf

A few pointers for generating the roofline chart.
  • Use option --read-smbios to get memory speed and the number of memory channels from the SMBIOS table. This requires root privileges
  • While collecting the data, if the AMDuProfPcm is launched with non-root privilege, specify the DRAM speed using -memspeed option with the AMDuProfModelling.py script. You can use dmidecode or lshw command to get the memory speed.
  • To plot additional computational horizontal peaks line, use the following options with AMDuProfModelling.py script:
    • --sp-roofs: Plot maximum peak roof for single-precision noSIMD and noFMA
    • --dp-roofs: Plot maximum peak roof for double-precision noSIMD and noFMA

Example

$ AMDuProfModelling.py -i /tmp/myapp-roofline.csv -o /tmp/ --memspeed 3200 -a myapp -dp-roofs
  • Use -a <appname> option with AMDuProfModelling.py script to specify the application name to print in the graph chart
  • As this tool uses the maximum theoretical peaks for memory traffic and floating-point performance, you can use benchmarks such as STREAM to get the peak memory bandwidth and HPL or GEMM for peak FLOPS. Those scores can be used to plot the roofline charts. Use the following options with AMDuProfModelling.py script:
    • --stream <STREAM score>
    • --hpl <HPL score>
    • --gemm <SGEMM | DGEMM score>
Figure 1. Sample Roofline Chart