cancel
Showing results for 
Search instead for 
Did you mean: 

GPU Developer Tools

eros16700
Journeyman III

How to get GPU load in percentage and GPU temperature?

Hi all,

I've just faced with the following problem, can't find appropriate API in AGS library to get GPU load/GPU temperature for Radeon video cards.

Does someone know which library I should use to get this values?

Thanks in advance...

0 Likes
3 Replies

Thank you a lot! This is piece of code from Overdrive_Sample.cpp (display-library/Overdrive_Sample.cpp at master · GPUOpen-LibrariesAndSDKs/display-library · GitHub )

...

ADLTemperature adlTemperature = {0};

adlTemperature.iSize = sizeof (ADLTemperature);

if (ADL_OK != ADL_Overdrive5_Temperature_Get ( adapterId, iThermalControllerIndex, &adlTemperature ))

{

     printf("Failed to get thermal devices temperature\n");

     return 0;

}

int temperatureInDegreesCelsius = adlTemperature.iTemperature / 1000; // The temperature is returned in millidegrees Celsius.

...

And for getting GPU load

...

//Getting real current values for clocks, performance levels, voltage effective in the system.

ADLPMActivity activity = {0};

activity.iSize = sizeof (ADLPMActivity);

if (ADL_OK != ADL_Overdrive5_CurrentActivity_Get (adapterId, &activity))

{

    printf("Failed to get current GPU activity.  \n");

    return 0;

}

...

printf ("Current Engine Clock: %d persent\n", activity.iActivityPercent);

...

0 Likes

Hope, you'll find the required APIs and code there. If you've any query related to ADL APIs and their usage, please post here: Issues · GPUOpen-LibrariesAndSDKs/display-library · GitHub

0 Likes