Added amdsmi cpu family & cpu model

- Updated header and source files
- Updated python interface
- Generated python wrapper for updated header
- Updated the CLI to have cpu family & cpu model
  as part of metric table

Change-Id: Iea440251797270d5d29ffe883b0ad6db790be658
This commit is contained in:
Deepak Mewar
2024-02-02 01:29:46 -05:00
committed by Maisam Arif
parent 8adf3eba1b
commit 6f7273fda5
9 changed files with 132 additions and 4 deletions
+14
View File
@@ -1496,6 +1496,20 @@ def amdsmi_first_online_core_on_cpu_socket(
return pcore_ind.value
def amdsmi_get_cpu_family():
family = ctypes.c_uint32()
_check_res(
amdsmi_wrapper.amdsmi_get_cpu_family(ctypes.byref(family))
)
return family.value
def amdsmi_get_cpu_model():
model = ctypes.c_uint32()
_check_res(
amdsmi_wrapper.amdsmi_get_cpu_model(ctypes.byref(model))
)
return model.value
def amdsmi_init(flag=AmdSmiInitFlags.INIT_AMD_GPUS):
if not isinstance(flag, AmdSmiInitFlags):
raise AmdSmiParameterException(flag, AmdSmiInitFlags)