Skip to content

Commit d482421

Browse files
author
Developer
committed
fix: merge gttMemory from amd-smi into GPU data
1 parent e27020d commit d482421

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

lib/system/rocm.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,8 @@ async function getAmdSmiMetrics(): Promise<Map<number, Partial<ROCmGPUInfo>>> {
698698
// GTT (Graphics Translation Table) - system memory used by GPU
699699
if (gpuData.mem_usage?.total_gtt?.value !== undefined) {
700700
const totalMB = parseInt(gpuData.mem_usage.total_gtt.value, 10);
701-
const usedMB = gpuData.mem_usage.used_gtt?.value
702-
? parseInt(gpuData.mem_usage.used_gtt.value, 10)
701+
const usedMB = gpuData.mem_usage.used_gtt?.value
702+
? parseInt(gpuData.mem_usage.used_gtt.value, 10)
703703
: 0;
704704
metrics.gttMemory = {
705705
total: Math.round((totalMB / 1024) * 100) / 100,
@@ -987,6 +987,9 @@ export async function detectROCm(): Promise<ROCmSystemInfo> {
987987
if (amdMetrics.memory) {
988988
gpu.memory = amdMetrics.memory;
989989
}
990+
if (amdMetrics.gttMemory) {
991+
gpu.gttMemory = amdMetrics.gttMemory;
992+
}
990993
if (amdMetrics.pcieWidth !== undefined) {
991994
gpu.pcieWidth = amdMetrics.pcieWidth;
992995
}

0 commit comments

Comments
 (0)