Renamed API amdsmi_get_device_bdf to amdsmi_get_gpu_device_bdf
grep -rli 'amdsmi_get_device_bdf' * | xargs -i@ sed -i 's/amdsmi_get_device_bdf/amdsmi_get_gpu_device_bdf/g' @ Change-Id: I3db605f8bdb0a83b1f0f7f300a663c47563ba651
This commit is contained in:
committed by
Naveen Krishna Chatradhi
parent
6e6176b04a
commit
3fec3b4b4a
@@ -216,7 +216,7 @@ except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
## amdsmi_get_device_bdf
|
||||
## amdsmi_get_gpu_device_bdf
|
||||
Description: Returns BDF of the given device
|
||||
|
||||
Input parameters:
|
||||
@@ -229,7 +229,7 @@ Where:
|
||||
* `<device>` is 2 hex digits long from 00-1F interval
|
||||
* `<function>` is 1 hex digit long from 0-7 interval
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_get_device_bdf` function:
|
||||
Exceptions that can be thrown by `amdsmi_get_gpu_device_bdf` function:
|
||||
* `AmdSmiParameterException`
|
||||
* `AmdSmiLibraryException`
|
||||
|
||||
@@ -237,7 +237,7 @@ Example:
|
||||
```python
|
||||
try:
|
||||
device = amdsmi_get_processor_handles()[0]
|
||||
print("Device's bdf:", amdsmi_get_device_bdf(device))
|
||||
print("Device's bdf:", amdsmi_get_gpu_device_bdf(device))
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
@@ -29,7 +29,7 @@ from .amdsmi_interface import amdsmi_get_processor_handles
|
||||
from .amdsmi_interface import amdsmi_get_socket_handles
|
||||
from .amdsmi_interface import amdsmi_get_socket_info
|
||||
|
||||
from .amdsmi_interface import amdsmi_get_device_bdf
|
||||
from .amdsmi_interface import amdsmi_get_gpu_device_bdf
|
||||
from .amdsmi_interface import amdsmi_get_device_uuid
|
||||
from .amdsmi_interface import amdsmi_get_processor_handle_from_bdf
|
||||
|
||||
|
||||
@@ -566,7 +566,7 @@ def amdsmi_get_processor_type(
|
||||
return dev_type.value
|
||||
|
||||
|
||||
def amdsmi_get_device_bdf(processor_handle: amdsmi_wrapper.amdsmi_processor_handle) -> str:
|
||||
def amdsmi_get_gpu_device_bdf(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
|
||||
@@ -574,7 +574,7 @@ def amdsmi_get_device_bdf(processor_handle: amdsmi_wrapper.amdsmi_processor_hand
|
||||
|
||||
bdf_info = amdsmi_wrapper.amdsmi_bdf_t()
|
||||
_check_res(
|
||||
amdsmi_wrapper.amdsmi_get_device_bdf(
|
||||
amdsmi_wrapper.amdsmi_get_gpu_device_bdf(
|
||||
processor_handle, ctypes.byref(bdf_info))
|
||||
)
|
||||
|
||||
|
||||
@@ -1664,9 +1664,9 @@ amdsmi_get_event_notification.argtypes = [ctypes.c_int32, ctypes.POINTER(ctypes.
|
||||
amdsmi_stop_event_notification = _libraries['libamd_smi.so'].amdsmi_stop_event_notification
|
||||
amdsmi_stop_event_notification.restype = amdsmi_status_t
|
||||
amdsmi_stop_event_notification.argtypes = [amdsmi_processor_handle]
|
||||
amdsmi_get_device_bdf = _libraries['libamd_smi.so'].amdsmi_get_device_bdf
|
||||
amdsmi_get_device_bdf.restype = amdsmi_status_t
|
||||
amdsmi_get_device_bdf.argtypes = [amdsmi_processor_handle, ctypes.POINTER(union_c__UA_amdsmi_bdf_t)]
|
||||
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)]
|
||||
@@ -1898,7 +1898,7 @@ __all__ = \
|
||||
'amdsmi_get_caps_info', 'amdsmi_get_clock_measure',
|
||||
'amdsmi_get_compute_process_gpus',
|
||||
'amdsmi_get_compute_process_info',
|
||||
'amdsmi_get_compute_process_info_by_pid', 'amdsmi_get_device_bdf',
|
||||
'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_driver_version', 'amdsmi_get_ecc_error_count',
|
||||
|
||||
@@ -263,7 +263,7 @@ class Formatter:
|
||||
print("{}{:25} :{}".format(space, self.style.background(key), str(value)))
|
||||
|
||||
def print_handle(self, handle):
|
||||
bdf = smi_api.amdsmi_get_device_bdf(handle)
|
||||
bdf = smi_api.amdsmi_get_gpu_device_bdf(handle)
|
||||
print("{:25} :{}".format(self.style.background("BDF"), str(bdf)))
|
||||
|
||||
def print_usage(self):
|
||||
|
||||
Reference in New Issue
Block a user