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

RaptorLake support #478

Open
edisonchan opened this issue Aug 8, 2022 · 1 comment
Open

RaptorLake support #478

edisonchan opened this issue Aug 8, 2022 · 1 comment

Comments

@edisonchan
Copy link

edisonchan commented Aug 8, 2022

Why do you need support for this specific architecture?
RaptorLake is coming soon..

**Which architecture model, family and further information? CPU or accelerator? **
Intel Raptor Lake CPU, 0xB7

Is the documentation of the hardware counters publicly available?
NOT YET.

Are there already any usable tools (commercial or open-source)?
NOT YET.

RPL is a hybrid CPU just like ADL that have P-Core and E-core.

I have try to simple add some raptorlake strings to make likwid work with the RPL P-core only(e-cores are disabled in BIOS).

here is the pakage that I have modified, I have not checked each counters , but it works so far with most group but ENERGY.

I dont know how to create the PR, so I pack the whole likwid folder and shared it on google drive.
https://drive.google.com/file/d/1__FSDUEv1veSVCxHdVlHjjzCnrHhMzPt/view?usp=sharing

Cannot gather values from unit register 0x606, deactivating RAPL support

sudo likwid-perfctr -C 0 -g BRANCH sleep 3
--------------------------------------------------------------------------------
CPU name:       13th Gen Intel(R) Core(TM) i9-13900K
CPU type:       Intel Raptorlake processor
CPU clock:      3.00 GHz
Cannot gather values from unit register 0x606, deactivating RAPL support
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Group 1: BRANCH
+------------------------------+---------+------------+
|             Event            | Counter | HWThread 0 |
+------------------------------+---------+------------+
|       INSTR_RETIRED_ANY      |  FIXC0  |    1522910 |
|     CPU_CLK_UNHALTED_CORE    |  FIXC1  |     850714 |
|     CPU_CLK_UNHALTED_REF     |  FIXC2  |     727116 |
| BR_INST_RETIRED_ALL_BRANCHES |   PMC0  |     376828 |
| BR_MISP_RETIRED_ALL_BRANCHES |   PMC1  |       4879 |
+------------------------------+---------+------------+

+----------------------------+------------+
|           Metric           | HWThread 0 |
+----------------------------+------------+
|     Runtime (RDTSC) [s]    |     3.0005 |
|    Runtime unhalted [s]    |     0.0003 |
|         Clock [MHz]        |  3504.3281 |
|             CPI            |     0.5586 |
|         Branch rate        |     0.2474 |
|  Branch misprediction rate |     0.0032 |
| Branch misprediction ratio |     0.0129 |
|   Instructions per branch  |     4.0414 |
+----------------------------+------------+

sudo likwid-perfctr -C 0 -g ENERGY sleep 3
--------------------------------------------------------------------------------
CPU name:       13th Gen Intel(R) Core(TM) i9-13900K
CPU type:       Intel Raptorlake processor
CPU clock:      2.99 GHz
Cannot gather values from unit register 0x606, deactivating RAPL support
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Group 1: ENERGY
+-----------------------+---------+------------+
|         Event         | Counter | HWThread 0 |
+-----------------------+---------+------------+
|   INSTR_RETIRED_ANY   |  FIXC0  |     177554 |
| CPU_CLK_UNHALTED_CORE |  FIXC1  |     317332 |
|  CPU_CLK_UNHALTED_REF |  FIXC2  |     241098 |
|       TEMP_CORE       |   TMP0  |         24 |
|     PWR_PKG_ENERGY    |   PWR0  |      -     |
|     PWR_PP0_ENERGY    |   PWR1  |      -     |
|    PWR_DRAM_ENERGY    |   PWR3  |      -     |
+-----------------------+---------+------------+

+----------------------+------------+
|        Metric        | HWThread 0 |
+----------------------+------------+
|  Runtime (RDTSC) [s] |     3.0005 |
| Runtime unhalted [s] |     0.0001 |
|      Clock [MHz]     |  3941.9947 |
|          CPI         |     1.7872 |
|    Temperature [C]   |         24 |
|      Energy [J]      |          0 |
|       Power [W]      |          0 |
|    Energy PP0 [J]    |          0 |
|     Power PP0 [W]    |          0 |
|    Energy DRAM [J]   |          0 |
|    Power DRAM [W]    |          0 |
+----------------------+------------+

cpu2017 500_perlbench_r:

--------------------------------------------------------------------------------
CPU name:	13th Gen Intel(R) Core(TM) i9-13900K
CPU type:	Intel Raptorlake processor
CPU clock:	3.00 GHz
--------------------------------------------------------------------------------
Group 1: DATA
+-----------------------------+---------+---------------+
|            Event            | Counter |   HWThread 0  |
+-----------------------------+---------+---------------+
|      INSTR_RETIRED_ANY      |  FIXC0  | 2734072813075 |
|    CPU_CLK_UNHALTED_CORE    |  FIXC1  |  724512668799 |
|     CPU_CLK_UNHALTED_REF    |  FIXC2  |  544545333696 |
|  MEM_INST_RETIRED_ALL_LOADS |   PMC0  |  819061848579 |
| MEM_INST_RETIRED_ALL_STORES |   PMC1  |  468860309830 |
+-----------------------------+---------+---------------+
+----------------------+------------+
|        Metric        | HWThread 0 |
+----------------------+------------+
|  Runtime (RDTSC) [s] |   182.0977 |
| Runtime unhalted [s] |   241.8901 |
|      Clock [MHz]     |  3985.1048 |
|          CPI         |     0.2650 |
|  Load to store ratio |     1.7469 |
+----------------------+------------+

The CPU freq should be 4.0 GHz here.(4GHz was set in BIOS, and idle=poll was set in grub kernel command line) , but that is not a problem, it would be 4.0GHz if run longer heavy workload.

OS: ubuntu 22.04.1 with kernel 5.19.
BIOS: e- cores were disabled, HTT disabled,

I think if this works(need add ENERGY/rpal support), then we can quick add support for ADL in some kind(disable e-core).

RAPL is enabled in my system(ubuntu 22.04 kernel 5.19), I have checked it works with "sudo s-tui" and rapl-tool(https://github.com/kentcz/rapl-tools), so I think there is some part of likwid source code (not?) need to modify to make it works, but I dont know the point so far.

@TomTheBear
Copy link
Member

How to do a PR:

  • Hit the Fork button on the top right of the LIKWID repo
  • Clone the forked repo (SSH recommended): git clone [email protected]:edisonchan/likwid.git
  • Apply your changes to that directory
  • (Use git config --local user.name "<your name>" and git config --local user.email "<your email>" in the folder to set your identity)
  • Push changes to the forked repo: git push
  • Go to the Github page of the forked repo. It will present a banner which advertises the PR. Hit "Compare" and select (if not already done) the master branches of both repositories. In the text part, you can add some comments in Markdown.

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