Renamed API amdsmi_get_device_uuid to
amdsmi_get_gpu_device_uuid
grep -rli 'amdsmi_get_device_uuid' * | xargs -i@ sed -i
's/amdsmi_get_device_uuid/amdsmi_get_gpu_device_uuid/g' @
Change-Id: I40bf740235a1a98d7d12964378b0b45208987c9e
[ROCm/amdsmi commit: 5ed24711c7]
Tá an tiomantas seo le fáil i:
tiomanta ag
Naveen Krishna Chatradhi
tuismitheoir
fc8df2885e
tiomantas
cb1d3ef3ce
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
)
|
||||
)
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir