Skip to content

Commit

Permalink
Switch GPUs to PS 16 before exit
Browse files Browse the repository at this point in the history
  • Loading branch information
sasha0552 authored Aug 8, 2024
1 parent 10c057b commit abd7993
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,14 @@ int main(int argc, char *argv[]) {

/***** NORMAL EXIT *****/
{
// Iterate through each GPU
for (unsigned int i = 0; i < deviceCount; i++) {
// Switch to automatic management of performance state
if (!enter_pstate(i, 16)) {
goto errored;
}
}

// Notify about the exit
printf("Exiting...\n");

Expand All @@ -294,7 +302,7 @@ int main(int argc, char *argv[]) {
}

errored:
/***** APPLICATION ERROR HAPPENED *****/
/***** APPLICATION ERROR OCCURRED *****/
{
error_occurred = true;
}
Expand Down

0 comments on commit abd7993

Please sign in to comment.