CoreFreq icon indicating copy to clipboard operation
CoreFreq copied to clipboard

[AMD][VMR/RPL/GNR] Voltage Curve Optimizer

Open cyring opened this issue 1 year ago • 13 comments

For AMD Vermeer, Raphael and Granite Ridge is introduced the VCO formula as a build argument:

make -j HWM_CHIPSET=AMD_VCO

Remarks:

  • without the HWM_CHIPSET argument, the CoreFreq build will fallback to the AMD P-State voltage formula.
  • the P-State formula is preferred with EPYC and any platform whom BIOS excludes voltage optimization
  • Feature is introduced as a build argument because I don't know any register which could help to switch dynamically to an appropriated voltage algorithm

cyring avatar Aug 25 '24 11:08 cyring

Contributors @leinardi [5800X] @LethalManBoob [5800X] [5700X] @thor2002ro [5900X] @Slaviusz [5950X] @WildPenquin [5950X] @ppascher [5950X] @olejon [5950X] @Jon0 [7950X] @KeithMyers [7950X] @amfern [7950X] @tofurky [7950X] @mikealanni [7945X] @madoverlord40 [9950X]

VCO change is available since 85b1e626183986c3bdfcc9b2bb046e8f24a13882 in develop branch

If you have chosen the Voltage Optimizer within BIOS option then you have to specify HWM_CHIPSET=AMD_VCO to get an appropriate voltage Core reading.

Please post screenshots of the UI View > Sensors > Voltage in various cases: Idle and Stressed CPU (not showing Menu)

2024-08-25-135530_644x511_scrot

Tips:

  • If you don't need the UI bar charts then you can build this way
make -j HWM_CHIPSET=AMD_VCO NO_UPPER=1

Thanks anyone for helping

cyring avatar Aug 25 '24 12:08 cyring

Please post screenshots of the UI View > Sensors > Voltage in various cases: Idle and Stressed CPU (not showing Menu)

Do I do this while having curve optimizer active, or not active?

madoverlord40 avatar Aug 27 '24 00:08 madoverlord40

Please post screenshots of the UI View > Sensors > Voltage in various cases: Idle and Stressed CPU (not showing Menu)

Do I do this while having curve optimizer active, or not active?

You do this while having curve optimizer active

cyring avatar Aug 27 '24 04:08 cyring

Ok so i cleaned and rebuilt with make -j HWM_CHIPSET=AMD_VCO Im using a CO in bios of -20.

Here is idle voltage view: Screenshot from 2024-08-27 16-02-08

All core stress using your software voltage view:

Screenshot from 2024-08-27 16-03-46

madoverlord40 avatar Aug 27 '24 23:08 madoverlord40

@madoverlord40 Thank you for your tests. CO is really odd: from idle to stress, the VID delta is just about 4 for most cores. And unfortunately 9950X results don't behave as 7950X ones

VID to voltage formula has to be customized directly in source code and as a function of the curve parameters left in BIOS https://github.com/cyring/CoreFreq/blob/85b1e626183986c3bdfcc9b2bb046e8f24a13882/x86_64/coretypes.h#L788


Now BIOS can be configured with no CO, voltage offset and tweaks. Just the plain P-State. PBO is ok. A simple make (without HWM_CHIPSET parameter) will now build CoreFreq with standard formula: please let ne know if voltage is accurate

cyring avatar Aug 28 '24 00:08 cyring

Not using Curve Optimizer. Using per CCX with 52.0/50.5 @ 1.28 VID Here is idle and stress screenshots under my Boinc load. Screenshot from 2024-08-27 17-08-57 Screenshot from 2024-08-27 17-07-56

KeithMyers avatar Aug 28 '24 03:08 KeithMyers

I still have CO on and have not testing with it off but as having curve optimizer on at -20 and level 5 CPU LLC in bios, i dont think this voltage is correct?

Screenshot from 2024-08-27 21-30-09

madoverlord40 avatar Aug 28 '24 04:08 madoverlord40

I still have CO on and have not testing with it off but as having curve optimizer on at -20 and level 5 CPU LLC in bios, i dont think this voltage is correct?

For this screenshot how was made the build ?

cyring avatar Aug 28 '24 09:08 cyring

Ok so i cleaned and rebuilt with make -j HWM_CHIPSET=AMD_VCO Im using a CO in bios of -20.

When CO is activated, the VID values in both case, idle and stressed, are so closed that it can't compute the low and high Vcore!

cyring avatar Aug 28 '24 09:08 cyring

Let me show you what we have with Zen2/Matisse

  1. No voltage optimizer or whatever LLC or performance tricks are activated
  2. Only PBO, in its default mode, is allowed
  • Idle case 2024-08-28-115823_564x550_scrot

  • All CPUs stressed 2024-08-28-115838_564x550_scrot

  • Single CPU stressed 2024-08-28-120227_564x550_scrot

The VID values (obtained from current P-State register) are inversely proportionate to the frequency

Applying the voltage formula (specified in AMD datasheet), we are getting an accurate voltage (for both CPU and SoC)


  • Zen1, Zen2 and Zen3
Vcore = 1.550 - (0.00625 * VID)

  • Zen3+ and Zen4: I have discovered this formula
Vcore = 0.00625 * VID

  • Zen5: no datasheet available; we have to guess a formula or we can bet a formula same as previous generations, especially when no voltage optimization is enabled.

cyring avatar Aug 28 '24 10:08 cyring

I still have CO on and have not testing with it off but as having curve optimizer on at -20 and level 5 CPU LLC in bios, i dont think this voltage is correct?

For this screenshot how was made the build ?

I think its still built with HWM_CHIPSET=AMD_VCO.

madoverlord40 avatar Aug 28 '24 17:08 madoverlord40

You know i think these voltages im getting right now are good, not that i know what the formulas should be. But i rebuilt with just -j on develop, and then started to build HLOD in unreal engine 5, and voltages were between 1.29 and 1.36 while boosting. Seeing that i have a CO of -20 and LLC of level 5, its doing well. Even if the voltages are not correct, they are i think quite close!

Yeah, its close, im in RM now during a C++ all core compile, RM is averaging 1.33vcore, you are so close!

madoverlord40 avatar Aug 28 '24 21:08 madoverlord40

You know i think these voltages im getting right now are good, not that i know what the formulas should be. But i rebuilt with just -j on develop, and then started to build HLOD in unreal engine 5, and voltages were between 1.29 and 1.36 while boosting. Seeing that i have a CO of -20 and LLC of level 5, its doing well. Even if the voltages are not correct, they are i think quite close!

Yeah, its close, im in RM now during a C++ all core compile, RM is averaging 1.33vcore, you are so close!

Great to see that. make -j brings the default voltage formula. I'm going to merge last commit into master Thank you for your help.

cyring avatar Aug 28 '24 23:08 cyring

Closing issue

To sum up:

  • Voltage curve is an optional compilation directive. User has to specialize the formula macro source code by her/him self.
  • The default build computes the voltage Core with the standard p-state formula.

cyring avatar Oct 02 '24 10:10 cyring

@madoverlord40 Hello,

I would like to make some code cleanup but I wonder if you are you building with AMD_VCO ?

If not can you tell if the latest CoreFreq is showing good voltage ?

Thank you

cyring avatar Jun 18 '25 15:06 cyring