cancel
Showing results for
Did you mean:

# GPU Developer Tools

Hello, everyone!

I am new here, but probably I have a real question that I did not find answer for on this forums using search.

I am writing a C++ application using ADL SDK 13 that is capable of tweaking GPU Frequency and Voltage, similar to 2020 Radeon Software tuning feature. I wrote code based on display-library/Overdrive8.cpp at master · GPUOpen-LibrariesAndSDKs/display-library · GitHub  example and it works, I am able to set individual values for any of freq or voltage settings. What I am missing is auto-adjustment, like if you change Frequency slider in Radeon Software, and Voltage automatically tunes. I tried percentage scaling, but immediately run into limits for Freq and Voltage not matching, e.g. minimal voltage setting did not mean minimal frequency because GPU could perform with better-than-minimal freq at minimal voltage. Same situation with upper limit - max frequency could be saturated with less than maximum voltage. On the attached image you can see that in my case max possible freq is achieved on just 60% of voltage. And on other GPUs, I imagine, those proportions are different each time.

This leads to my question, how can I learn or calculate those proportions to do similar auto-adjust for any given GPU?

I have just noticed that there is 14 version of ADL released, but from brief looking at the changes I did not see anything related that could help me. I will update ASAP anyway.

1 Solution
Big Boss

As the concerned team has replied, below is how the GFX curve works:

The driver sends three default points, and the UI calculate the parabola coefficient based on these three points. The UI saves the coefficient, and when the user changes Fmax / Fmin sliders, the UI calculates the corresponding voltage for these three points. Dragging these three points vertically(changing their voltage only) will change the saved coefficient.

In the returned structure: int** lppCurrentSettingList , please check for these entries in the array:

OD8_SETTING_GFXCLK_FMAX = 0,
OD8_SETTING_GFXCLK_FMIN = 1,
OD8_SETTING_GFXCLK_FREQ1 = 2,
OD8_SETTING_GFXCLK_VOLTAGE1 = 3,
OD8_SETTING_GFXCLK_FREQ2 = 4,
OD8_SETTING_GFXCLK_VOLTAGE2 = 5,
OD8_SETTING_GFXCLK_FREQ3 = 6,
OD8_SETTING_GFXCLK_VOLTAGE3 = 7,

They represent the Fmax / Fmin and all the three points. Fmax = FREQ3, Fmin = FREQ1 and FREQ2 = (FREQ3 + FREQ1) / 2

In RSX, we check approx. every 3 secs, if points get changed(usually is the case that we applied our settings), we update the coefficient.

Thanks.

4 Replies
Big Boss

Thank you for the above query. I'll check with the ADL team for their suggestion regarding this.

Also, I have whitelisted you for the DevGurus community.

Thanks.

Big Boss

As the concerned team has replied, below is how the GFX curve works:

The driver sends three default points, and the UI calculate the parabola coefficient based on these three points. The UI saves the coefficient, and when the user changes Fmax / Fmin sliders, the UI calculates the corresponding voltage for these three points. Dragging these three points vertically(changing their voltage only) will change the saved coefficient.

In the returned structure: int** lppCurrentSettingList , please check for these entries in the array:

OD8_SETTING_GFXCLK_FMAX = 0,
OD8_SETTING_GFXCLK_FMIN = 1,
OD8_SETTING_GFXCLK_FREQ1 = 2,
OD8_SETTING_GFXCLK_VOLTAGE1 = 3,
OD8_SETTING_GFXCLK_FREQ2 = 4,
OD8_SETTING_GFXCLK_VOLTAGE2 = 5,
OD8_SETTING_GFXCLK_FREQ3 = 6,
OD8_SETTING_GFXCLK_VOLTAGE3 = 7,

They represent the Fmax / Fmin and all the three points. Fmax = FREQ3, Fmin = FREQ1 and FREQ2 = (FREQ3 + FREQ1) / 2

In RSX, we check approx. every 3 secs, if points get changed(usually is the case that we applied our settings), we update the coefficient.

Thanks.

Thank you, I will definitely try this!

Since then I started gathering a table of values for GPUs I care about at first to see if any pattern is present. If parabola coefficient suits for any given card, this is definitely easier

Journeyman III

can you share your code which you change the voltages and freq's. I am trying to do the same and it keeps defaulting back to the defaults when doing the change. RX 5700 in Question