Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 84e1e19

Browse files
authored
fix: add used vram into system event body (#1012)
1 parent 80b0350 commit 84e1e19

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cortex-js/src/domain/models/resource.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ export interface UsedMemInfo {
1717

1818
export interface GpuInfo {
1919
name: string | undefined;
20-
vram: number | null;
20+
vram: UsedMemInfo;
2121
}

cortex-js/src/infrastructure/services/resources-manager/resources-manager.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,10 @@ export class ResourcesManagerService {
2525
},
2626
gpus: (await si.graphics()).controllers.map((gpu) => ({
2727
name: gpu.name,
28-
vram: gpu.vram,
28+
vram: {
29+
total: gpu.vram ?? 0,
30+
used: gpu.memoryUsed ?? 0,
31+
}
2932
})),
3033
};
3134
}

0 commit comments

Comments
 (0)