Skip to content

Commit

Permalink
Fix bug in GPU utilization on AMD GPUs
Browse files Browse the repository at this point in the history
  • Loading branch information
tpatki committed Mar 11, 2024
1 parent 108b569 commit 8ae4b80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/variorum/AMD_GPU/amd_gpu_power_features.c
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,6 @@ void get_gpu_utilization_data_json(int chipid, int total_sockets,
rsmi_status_t ret;
uint32_t num_devices;
int gpus_per_socket;
int d = 0;
char socket_id[12];
char hostname[1024];
char device_id[12];
Expand Down Expand Up @@ -869,7 +868,7 @@ void get_gpu_utilization_data_json(int chipid, int total_sockets,
getenv("HOSTNAME"), __FILE__, __FUNCTION__,
__LINE__);
}
snprintf(device_id, 12, "GPU%d_util%%", d);
snprintf(device_id, 12, "GPU%d_util%%", i);
json_object_set_new(socket_obj, device_id, json_integer(utilpercent));
}

Expand Down

0 comments on commit 8ae4b80

Please sign in to comment.