Add API for the memory type

Get the memory type from libdrm and add a new API.

Change-Id: I89327bca2ef860f2e3f4f6ca20def2331eba66c0
This commit is contained in:
Bill(Shuzhou) Liu
2023-08-31 09:08:46 -05:00
orang tua f96c7663b5
melakukan b52034fed8
7 mengubah file dengan 145 tambahan dan 13 penghapusan
@@ -145,6 +145,19 @@ void TestIdInfoRead::Run(void) {
}
}
amdsmi_vram_info_t vram_info;
err = amdsmi_get_gpu_vram_info(processor_handles_[i], &vram_info);
CHK_ERR_ASRT(err)
IF_VERB(STANDARD) {
std::cout << "\t**Device Vram type id: "
<< vram_info.vram_type << std::endl;
std::cout << "\t**Device Vram vendor id: "
<< vram_info.vram_vendor << std::endl;
std::cout << "\t**Device Vram size: "
<< vram_info.vram_size_mb << std::endl;
}
err = amdsmi_get_gpu_vendor_name(processor_handles_[i], buffer, kBufferLen);
if (err == AMDSMI_STATUS_NOT_SUPPORTED) {
std::cout << "\t**Device Vendor name string not found on this system." <<