Added memory information to Guest

Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I3e6b4bba3746c9498d34e6d2840461489eb3bc61
Signed-off-by: Maisam Arif <maisarif@amd.com>


[ROCm/amdsmi commit: 02b4b67ca0]
This commit is contained in:
Maisam Arif
2023-10-05 02:13:36 -05:00
committed by Galantsev, Dmitrii
parent 657d011f57
commit 8a9387cdec
3 changed files with 41 additions and 26 deletions
+3 -1
View File
@@ -805,7 +805,9 @@ amdsmi_status_t amdsmi_get_gpu_vram_info(
uint64_t total = 0;
r = rsmi_wrapper(rsmi_dev_memory_total_get, processor_handle,
RSMI_MEM_TYPE_VRAM, &total);
info->vram_size_mb = total / (1024 * 1024);
if (r == AMDSMI_STATUS_SUCCESS) {
info->vram_size_mb = total / (1024 * 1024);
}
return AMDSMI_STATUS_SUCCESS;
}