diff --git a/projects/amdsmi/example/amd_smi_drm_example.cc b/projects/amdsmi/example/amd_smi_drm_example.cc index fb68610184..19afc9a109 100644 --- a/projects/amdsmi/example/amd_smi_drm_example.cc +++ b/projects/amdsmi/example/amd_smi_drm_example.cc @@ -328,9 +328,9 @@ int main() { // Get device uuid unsigned int uuid_length = AMDSMI_GPU_UUID_SIZE; char uuid[AMDSMI_GPU_UUID_SIZE]; - ret = amdsmi_get_device_uuid(processor_handles[j], &uuid_length, uuid); + ret = amdsmi_get_gpu_device_uuid(processor_handles[j], &uuid_length, uuid); CHK_AMDSMI_RET(ret) - printf(" Output of amdsmi_get_device_uuid:\n"); + printf(" Output of amdsmi_get_gpu_device_uuid:\n"); printf("\tDevice uuid: %s\n\n", uuid); // Get engine usage info diff --git a/projects/amdsmi/include/amd_smi/amdsmi.h b/projects/amdsmi/include/amd_smi/amdsmi.h index 137139810c..970008ed14 100644 --- a/projects/amdsmi/include/amd_smi/amdsmi.h +++ b/projects/amdsmi/include/amd_smi/amdsmi.h @@ -3586,7 +3586,7 @@ amdsmi_get_gpu_device_bdf(amdsmi_processor_handle processor_handle, amdsmi_bdf_t * @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail */ amdsmi_status_t -amdsmi_get_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid); +amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid); /*****************************************************************************/ /** @defgroup swversion SW Version Information diff --git a/projects/amdsmi/py-interface/README.md b/projects/amdsmi/py-interface/README.md index 9c8802b635..e41ac0ce08 100644 --- a/projects/amdsmi/py-interface/README.md +++ b/projects/amdsmi/py-interface/README.md @@ -140,7 +140,7 @@ try: print("No GPUs on machine") else: for device in devices: - print(amdsmi_get_device_uuid(device)) + print(amdsmi_get_gpu_device_uuid(device)) except AmdSmiException as e: print(e) ``` @@ -211,7 +211,7 @@ Example: ```python try: device = amdsmi_get_processor_handle_from_bdf("0000:23:00.0") - print(amdsmi_get_device_uuid(device)) + print(amdsmi_get_gpu_device_uuid(device)) except AmdSmiException as e: print(e) ``` @@ -242,7 +242,7 @@ except AmdSmiException as e: print(e) ``` -## amdsmi_get_device_uuid +## amdsmi_get_gpu_device_uuid Description: Returns the UUID of the device Input parameters: @@ -250,7 +250,7 @@ Input parameters: Output: UUID string unique to the device -Exceptions that can be thrown by `amdsmi_get_device_uuid` function: +Exceptions that can be thrown by `amdsmi_get_gpu_device_uuid` function: * `AmdSmiParameterException` * `AmdSmiLibraryException` @@ -258,7 +258,7 @@ Example: ```python try: device = amdsmi_get_processor_handles()[0] - print("Device UUID: ", amdsmi_get_device_uuid(device)) + print("Device UUID: ", amdsmi_get_gpu_device_uuid(device)) except AmdSmiException as e: print(e) ``` diff --git a/projects/amdsmi/py-interface/__init__.py b/projects/amdsmi/py-interface/__init__.py index ed16c50a2f..9c658451cb 100644 --- a/projects/amdsmi/py-interface/__init__.py +++ b/projects/amdsmi/py-interface/__init__.py @@ -30,7 +30,7 @@ from .amdsmi_interface import amdsmi_get_socket_handles from .amdsmi_interface import amdsmi_get_socket_info from .amdsmi_interface import amdsmi_get_gpu_device_bdf -from .amdsmi_interface import amdsmi_get_device_uuid +from .amdsmi_interface import amdsmi_get_gpu_device_uuid from .amdsmi_interface import amdsmi_get_processor_handle_from_bdf # # SW Version Information diff --git a/projects/amdsmi/py-interface/amdsmi_interface.py b/projects/amdsmi/py-interface/amdsmi_interface.py index c42082022d..7a1cd605b2 100644 --- a/projects/amdsmi/py-interface/amdsmi_interface.py +++ b/projects/amdsmi/py-interface/amdsmi_interface.py @@ -920,7 +920,7 @@ def amdsmi_get_process_info( } -def amdsmi_get_device_uuid(processor_handle: amdsmi_wrapper.amdsmi_processor_handle) -> str: +def amdsmi_get_gpu_device_uuid(processor_handle: amdsmi_wrapper.amdsmi_processor_handle) -> str: if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle): raise AmdSmiParameterException( processor_handle, amdsmi_wrapper.amdsmi_processor_handle @@ -932,7 +932,7 @@ def amdsmi_get_device_uuid(processor_handle: amdsmi_wrapper.amdsmi_processor_han uuid_length.value = _AMDSMI_GPU_UUID_SIZE _check_res( - amdsmi_wrapper.amdsmi_get_device_uuid( + amdsmi_wrapper.amdsmi_get_gpu_device_uuid( processor_handle, ctypes.byref(uuid_length), uuid ) ) diff --git a/projects/amdsmi/py-interface/amdsmi_wrapper.py b/projects/amdsmi/py-interface/amdsmi_wrapper.py index db4aafbee2..f0f547f702 100644 --- a/projects/amdsmi/py-interface/amdsmi_wrapper.py +++ b/projects/amdsmi/py-interface/amdsmi_wrapper.py @@ -1667,9 +1667,9 @@ amdsmi_stop_event_notification.argtypes = [amdsmi_processor_handle] amdsmi_get_gpu_device_bdf = _libraries['libamd_smi.so'].amdsmi_get_gpu_device_bdf amdsmi_get_gpu_device_bdf.restype = amdsmi_status_t amdsmi_get_gpu_device_bdf.argtypes = [amdsmi_processor_handle, ctypes.POINTER(union_c__UA_amdsmi_bdf_t)] -amdsmi_get_device_uuid = _libraries['libamd_smi.so'].amdsmi_get_device_uuid -amdsmi_get_device_uuid.restype = amdsmi_status_t -amdsmi_get_device_uuid.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_char)] +amdsmi_get_gpu_device_uuid = _libraries['libamd_smi.so'].amdsmi_get_gpu_device_uuid +amdsmi_get_gpu_device_uuid.restype = amdsmi_status_t +amdsmi_get_gpu_device_uuid.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(ctypes.c_char)] amdsmi_get_driver_version = _libraries['libamd_smi.so'].amdsmi_get_driver_version amdsmi_get_driver_version.restype = amdsmi_status_t amdsmi_get_driver_version.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_char)] @@ -1900,7 +1900,7 @@ __all__ = \ 'amdsmi_get_compute_process_info', 'amdsmi_get_compute_process_info_by_pid', 'amdsmi_get_gpu_device_bdf', 'amdsmi_get_processor_handle_from_bdf', 'amdsmi_get_processor_handles', - 'amdsmi_get_processor_type', 'amdsmi_get_device_uuid', + 'amdsmi_get_processor_type', 'amdsmi_get_gpu_device_uuid', 'amdsmi_get_driver_version', 'amdsmi_get_ecc_error_count', 'amdsmi_get_event_notification', 'amdsmi_get_func_iter_value', 'amdsmi_get_fw_info', 'amdsmi_get_gpu_activity', diff --git a/projects/amdsmi/src/amd_smi/amd_smi.cc b/projects/amdsmi/src/amd_smi/amd_smi.cc index 01e9ed9021..3c92dff619 100644 --- a/projects/amdsmi/src/amd_smi/amd_smi.cc +++ b/projects/amdsmi/src/amd_smi/amd_smi.cc @@ -1810,7 +1810,7 @@ amdsmi_get_driver_version(amdsmi_processor_handle processor_handle, int *length, } amdsmi_status_t -amdsmi_get_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid) { +amdsmi_get_gpu_device_uuid(amdsmi_processor_handle processor_handle, unsigned int *uuid_length, char *uuid) { AMDSMI_CHECK_INIT(); if (uuid_length == nullptr || uuid == nullptr) {