[SWDEV-547160] Fix VRAM percentage calculation
The vram_percent calculation was missing
multiplication by 100.
Signed-off-by: Bindhiya Kanangot Balakrishnan <Bindhiya.KanangotBalakrishnan@amd.com>
[ROCm/amdsmi commit: 41488f0c18]
This commit is contained in:
committed by
Arif, Maisam
parent
4e568b2eea
commit
8e645a6da7
@@ -5945,7 +5945,10 @@ class AMDSMICommands():
|
||||
monitor_values['vram_used'] = vram_used
|
||||
monitor_values['vram_free'] = vram_total - vram_used
|
||||
monitor_values['vram_total'] = vram_total
|
||||
monitor_values['vram_percent'] = round ((vram_used / vram_total), 2)
|
||||
if vram_total != 0:
|
||||
monitor_values['vram_percent'] = round ((vram_used / vram_total) * 100, 2)
|
||||
else:
|
||||
monitor_values['vram_percent'] = "N/A"
|
||||
|
||||
vram_usage_unit = "MB"
|
||||
vram_percent_unit = "%"
|
||||
|
||||
Reference in New Issue
Block a user