Change API to get the driver date
Support the driver date from libdrm.
Change-Id: I88e694732b538220e11fdb4029712bb5a6f44380
[ROCm/amdsmi commit: 55bf9cbe13]
This commit is contained in:
1 parent
2cd3f6565e
commit
4d4f8a4f8c
12 files changed
+92
-41
No files matched your search
@@ -917,9 +917,9 @@ def amdsmi_get_gpu_device_uuid(processor_handle: amdsmi_wrapper.amdsmi_processor
|
||||
return uuid.value.decode("utf-8")
|
||||
|
||||
|
||||
def amdsmi_get_gpu_driver_version(
|
||||
def amdsmi_get_gpu_driver_info(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
) -> str:
|
||||
) -> Dict[str, Any]:
|
||||
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
|
||||
raise AmdSmiParameterException(
|
||||
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
|
||||
@@ -930,13 +930,17 @@ def amdsmi_get_gpu_driver_version(
|
||||
|
||||
version = ctypes.create_string_buffer(_AMDSMI_MAX_DRIVER_VERSION_LENGTH)
|
||||
|
||||
info = amdsmi_wrapper.amdsmi_driver_info_t()
|
||||
_check_res(
|
||||
amdsmi_wrapper.amdsmi_get_gpu_driver_version(
|
||||
processor_handle, ctypes.byref(length), version
|
||||
amdsmi_wrapper.amdsmi_get_gpu_driver_info(
|
||||
processor_handle, ctypes.byref(info)
|
||||
)
|
||||
)
|
||||
|
||||
return version.value.decode("utf-8")
|
||||
return {
|
||||
"driver_version": info.driver_version.decode("utf-8"),
|
||||
"driver_date": info.driver_date.decode("utf-8")
|
||||
}
|
||||
|
||||
|
||||
def amdsmi_get_power_info(
|
||||
|
||||
Reference in new issue
Block a user