Renamed API amdsmi_dev_get_pci_id to
amdsmi_get_gpu_pci_id grep -rli 'amdsmi_dev_get_pci_id' * | xargs -i@ sed -i 's/amdsmi_dev_get_pci_id/amdsmi_get_gpu_pci_id/g' @ Change-Id: If5454038cf582bdf3c657f466d0f6eb1dd3c14e0
This commit is contained in:
committed by
Naveen Krishna Chatradhi
parent
928b7e2a4d
commit
55ddbdc67e
@@ -1313,7 +1313,7 @@ except AmdSmiException as e:
|
||||
```
|
||||
|
||||
|
||||
## amdsmi_dev_get_pci_id
|
||||
## amdsmi_get_gpu_pci_id
|
||||
Description: Get the unique PCI device identifier associated for a device
|
||||
|
||||
Input parameters:
|
||||
@@ -1335,7 +1335,7 @@ BDFID = ((DOMAIN & 0xffffffff) << 32) | ((BUS & 0xff) << 8) |
|
||||
| Function | [ 2: 0] |
|
||||
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_dev_get_pci_id` function:
|
||||
Exceptions that can be thrown by `amdsmi_get_gpu_pci_id` function:
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
* `AmdSmiParameterException`
|
||||
@@ -1348,7 +1348,7 @@ try:
|
||||
print("No GPUs on machine")
|
||||
else:
|
||||
for device in devices:
|
||||
bdfid = amdsmi_dev_get_pci_id(device)
|
||||
bdfid = amdsmi_get_gpu_pci_id(device)
|
||||
print(bdfid)
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
|
||||
@@ -137,7 +137,7 @@ from .amdsmi_interface import amdsmi_dev_xgmi_error_status
|
||||
from .amdsmi_interface import amdsmi_dev_reset_xgmi_error
|
||||
|
||||
# # PCIE information
|
||||
from .amdsmi_interface import amdsmi_dev_get_pci_id
|
||||
from .amdsmi_interface import amdsmi_get_gpu_pci_id
|
||||
from .amdsmi_interface import amdsmi_get_gpu_pci_bandwidth
|
||||
from .amdsmi_interface import amdsmi_dev_get_pci_throughput
|
||||
from .amdsmi_interface import amdsmi_dev_get_pci_replay_counter
|
||||
|
||||
@@ -1626,7 +1626,7 @@ def amdsmi_dev_open_supported_func_iterator(
|
||||
return obj_handle
|
||||
|
||||
|
||||
def amdsmi_dev_get_pci_id(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
|
||||
def amdsmi_get_gpu_pci_id(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
|
||||
if not isinstance(processor_handle, amdsmi_wrapper.amdsmi_processor_handle):
|
||||
raise AmdSmiParameterException(
|
||||
processor_handle, amdsmi_wrapper.amdsmi_processor_handle
|
||||
@@ -1634,7 +1634,7 @@ def amdsmi_dev_get_pci_id(processor_handle: amdsmi_wrapper.amdsmi_processor_hand
|
||||
|
||||
bdfid = ctypes.c_uint64()
|
||||
_check_res(
|
||||
amdsmi_wrapper.amdsmi_dev_get_pci_id(
|
||||
amdsmi_wrapper.amdsmi_get_gpu_pci_id(
|
||||
processor_handle, ctypes.byref(bdfid))
|
||||
)
|
||||
|
||||
|
||||
@@ -1442,9 +1442,9 @@ amdsmi_get_gpu_drm_render_minor.argtypes = [amdsmi_processor_handle, ctypes.POIN
|
||||
amdsmi_get_gpu_pci_bandwidth = _libraries['libamd_smi.so'].amdsmi_get_gpu_pci_bandwidth
|
||||
amdsmi_get_gpu_pci_bandwidth.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_pci_bandwidth.argtypes = [amdsmi_processor_handle, ctypes.POINTER(struct_c__SA_amdsmi_pcie_bandwidth_t)]
|
||||
amdsmi_dev_get_pci_id = _libraries['libamd_smi.so'].amdsmi_dev_get_pci_id
|
||||
amdsmi_dev_get_pci_id.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_pci_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)]
|
||||
amdsmi_get_gpu_pci_id = _libraries['libamd_smi.so'].amdsmi_get_gpu_pci_id
|
||||
amdsmi_get_gpu_pci_id.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_pci_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)]
|
||||
amdsmi_topo_get_numa_affinity = _libraries['libamd_smi.so'].amdsmi_topo_get_numa_affinity
|
||||
amdsmi_topo_get_numa_affinity.restype = amdsmi_status_t
|
||||
amdsmi_topo_get_numa_affinity.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32)]
|
||||
@@ -1862,7 +1862,7 @@ __all__ = \
|
||||
'amdsmi_dev_get_memory_total', 'amdsmi_dev_get_memory_usage',
|
||||
'amdsmi_dev_get_od_volt_curve_regions',
|
||||
'amdsmi_dev_get_od_volt_info', 'amdsmi_dev_get_overdrive_level',
|
||||
'amdsmi_get_gpu_pci_bandwidth', 'amdsmi_dev_get_pci_id',
|
||||
'amdsmi_get_gpu_pci_bandwidth', 'amdsmi_get_gpu_pci_id',
|
||||
'amdsmi_dev_get_pci_replay_counter',
|
||||
'amdsmi_dev_get_pci_throughput', 'amdsmi_dev_get_perf_level',
|
||||
'amdsmi_dev_get_power_ave',
|
||||
|
||||
@@ -293,7 +293,7 @@ class Formatter:
|
||||
| """ + self.style.text(" 4 Get device drm render minor. Api: amdsmi_get_gpu_drm_render_minor <bdf>") + """ |
|
||||
| """ + self.style.text(" 5 Get device subsystem id. Api: amdsmi_get_gpu_subsystem_id <bdf>") + """ |
|
||||
| """ + self.style.text(" 6 Get device subsystem name. Api: amdsmi_get_gpu_subsystem_name <bdf>") + """ |
|
||||
| """ + self.style.text(" 7 Get device pci id. Api: amdsmi_dev_get_pci_id <bdf>") + """ |
|
||||
| """ + self.style.text(" 7 Get device pci id. Api: amdsmi_get_gpu_pci_id <bdf>") + """ |
|
||||
| """ + self.style.text(" 8 Get device pci bandwidth. Api: amdsmi_get_gpu_pci_bandwidth <bdf>") + """ |
|
||||
| """ + self.style.text(" 9 Get device pci throughput. Api: amdsmi_dev_get_pci_throughput <bdf>") + """ |
|
||||
| """ + self.style.text("10 Get device pci replay counter. Api: amdsmi_dev_get_pci_replay_counter <bdf>") + """ |
|
||||
@@ -740,7 +740,7 @@ commands = {
|
||||
6: [smi_api.amdsmi_get_gpu_subsystem_name, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
7: [smi_api.amdsmi_dev_get_pci_id, {
|
||||
7: [smi_api.amdsmi_get_gpu_pci_id, {
|
||||
"device_identifier1": [None, True]
|
||||
}],
|
||||
8: [smi_api.amdsmi_get_gpu_pci_bandwidth, {
|
||||
|
||||
Reference in New Issue
Block a user