Added vram info to static --vram
Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: I48f6875d5131440848ef6f5875c6d385fee871e3
[ROCm/amdsmi commit: 6dcfd4a815]
This commit is contained in:
@@ -39,6 +39,7 @@ from .amdsmi_interface import amdsmi_get_gpu_driver_info
|
||||
# # ASIC and Bus Static Information
|
||||
from .amdsmi_interface import amdsmi_get_gpu_asic_info
|
||||
from .amdsmi_interface import amdsmi_get_power_cap_info
|
||||
from .amdsmi_interface import amdsmi_get_gpu_vram_info
|
||||
|
||||
# # Microcode and VBIOS Information
|
||||
from .amdsmi_interface import amdsmi_get_gpu_vbios_info
|
||||
|
||||
@@ -669,6 +669,27 @@ def amdsmi_get_power_cap_info(
|
||||
"max_power_cap": power_info.max_power_cap}
|
||||
|
||||
|
||||
def amdsmi_get_gpu_vram_info(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
) -> Dict[str, Any]:
|
||||
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
|
||||
raise AmdSmiParameterException(
|
||||
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
|
||||
)
|
||||
|
||||
vram_info = amdsmi_wrapper.amdsmi_vram_info_t()
|
||||
_check_res(
|
||||
amdsmi_wrapper.amdsmi_get_gpu_vram_info(
|
||||
processor_handle, ctypes.byref(vram_info))
|
||||
)
|
||||
|
||||
return {
|
||||
"vram_type": vram_info.vram_type,
|
||||
"vram_vendor": vram_info.vram_vendor,
|
||||
"vram_size_mb": vram_info.vram_size_mb,
|
||||
}
|
||||
|
||||
|
||||
def amdsmi_get_gpu_vbios_info(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
) -> Dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user