WorkerThread.getGpuUsage() updates the metrics of all available GPUs. That's redundant since one worker thread is assigned to one GPU.
Pass the array list holding the relevnat GPU id.
Blocked by #21
public String getGpuUsage() {
StringBuffer gpuUsage = new StringBuffer();
if (gpuId >= 0) {
try {
configManager.systemInfo.updateAcceleratorMetrics(); // <--- pass [gpuid] here
Accelerator accelerator =
this.configManager.systemInfo.getAccelerators().get(gpuId);
return accelerator.utilizationToString();
} catch (Exception e) {
gpuUsage.append("failed to obtained gpu usage");
logger.error("Exception Raised : " + e.toString());
}
} else {
gpuUsage.append("N/A");
}
return gpuUsage.toString();
}
WorkerThread.getGpuUsage()updates the metrics of all available GPUs. That's redundant since one worker thread is assigned to one GPU.Pass the array list holding the relevnat GPU id.
Blocked by #21