Renamed API amdsmi_dev_get_pci_throughput to

amdsmi_get_gpu_pci_throughput

grep -rli 'amdsmi_dev_get_pci_throughput' * | xargs -i@ sed -i
's/amdsmi_dev_get_pci_throughput/amdsmi_get_gpu_pci_throughput/g' @

Change-Id: Id6dbd3591d59954622237770e15320583b63dbe0


[ROCm/amdsmi commit: 931099683b]
Šī revīzija ir iekļauta:
Deepak Mewar
2023-02-25 07:39:10 -05:00
revīziju iesūtīja Naveen Krishna Chatradhi
vecāks 52c0195b86
revīzija 642986764b
9 mainīti faili ar 18 papildinājumiem un 18 dzēšanām
+3 -3
Parādīt failu
@@ -1397,7 +1397,7 @@ except AmdSmiException as e:
print(e)
```
## amdsmi_dev_get_pci_throughput
## amdsmi_get_gpu_pci_throughput
Description: Get PCIe traffic information
Input parameters:
@@ -1412,7 +1412,7 @@ Field | Content
`received` | the number of bytes received
`max_pkt_sz` | maximum packet size
Exceptions that can be thrown by `amdsmi_dev_get_pci_throughput` function:
Exceptions that can be thrown by `amdsmi_get_gpu_pci_throughput` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
* `AmdSmiParameterException`
@@ -1425,7 +1425,7 @@ try:
print("No GPUs on machine")
else:
for device in devices:
pci = amdsmi_dev_get_pci_throughput(device)
pci = amdsmi_get_gpu_pci_throughput(device)
print(pci)
except AmdSmiException as e:
print(e)
@@ -139,7 +139,7 @@ from .amdsmi_interface import amdsmi_dev_reset_xgmi_error
# # PCIE information
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_get_gpu_pci_throughput
from .amdsmi_interface import amdsmi_dev_get_pci_replay_counter
from .amdsmi_interface import amdsmi_get_gpu_topo_numa_affinity
@@ -1763,7 +1763,7 @@ def amdsmi_get_gpu_pci_bandwidth(processor_handle: amdsmi_wrapper.amdsmi_process
}
def amdsmi_dev_get_pci_throughput(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
def amdsmi_get_gpu_pci_throughput(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
@@ -1774,7 +1774,7 @@ def amdsmi_dev_get_pci_throughput(processor_handle: amdsmi_wrapper.amdsmi_proces
max_pkt_sz = ctypes.c_uint64()
_check_res(
amdsmi_wrapper.amdsmi_dev_get_pci_throughput(processor_handle, ctypes.byref(
amdsmi_wrapper.amdsmi_get_gpu_pci_throughput(processor_handle, ctypes.byref(
sent), ctypes.byref(received), ctypes.byref(max_pkt_sz))
)
@@ -1448,9 +1448,9 @@ amdsmi_get_gpu_pci_id.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes
amdsmi_get_gpu_topo_numa_affinity = _libraries['libamd_smi.so'].amdsmi_get_gpu_topo_numa_affinity
amdsmi_get_gpu_topo_numa_affinity.restype = amdsmi_status_t
amdsmi_get_gpu_topo_numa_affinity.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32)]
amdsmi_dev_get_pci_throughput = _libraries['libamd_smi.so'].amdsmi_dev_get_pci_throughput
amdsmi_dev_get_pci_throughput.restype = amdsmi_status_t
amdsmi_dev_get_pci_throughput.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint64)]
amdsmi_get_gpu_pci_throughput = _libraries['libamd_smi.so'].amdsmi_get_gpu_pci_throughput
amdsmi_get_gpu_pci_throughput.restype = amdsmi_status_t
amdsmi_get_gpu_pci_throughput.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint64), ctypes.POINTER(ctypes.c_uint64)]
amdsmi_dev_get_pci_replay_counter = _libraries['libamd_smi.so'].amdsmi_dev_get_pci_replay_counter
amdsmi_dev_get_pci_replay_counter.restype = amdsmi_status_t
amdsmi_dev_get_pci_replay_counter.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)]
@@ -1864,7 +1864,7 @@ __all__ = \
'amdsmi_dev_get_od_volt_info', 'amdsmi_dev_get_overdrive_level',
'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_get_gpu_pci_throughput', 'amdsmi_dev_get_perf_level',
'amdsmi_dev_get_power_ave',
'amdsmi_dev_get_power_profile_presets',
'amdsmi_get_gpu_subsystem_id', 'amdsmi_get_gpu_subsystem_name',
@@ -295,7 +295,7 @@ class Formatter:
| """ + 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_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(" 9 Get device pci throughput. Api: amdsmi_get_gpu_pci_throughput <bdf>") + """ |
| """ + self.style.text("10 Get device pci replay counter. Api: amdsmi_dev_get_pci_replay_counter <bdf>") + """ |
| """ + self.style.text("11 Get topo numa affinity. Api: amdsmi_get_gpu_topo_numa_affinity <bdf>") + """ |
| """ + self.style.text("12 Get device power ave. Api: amdsmi_dev_get_power_ave <bdf><sensor_id>") + """ |
@@ -746,7 +746,7 @@ commands = {
8: [smi_api.amdsmi_get_gpu_pci_bandwidth, {
"device_identifier1": [None, True]
}],
9: [smi_api.amdsmi_dev_get_pci_throughput, {
9: [smi_api.amdsmi_get_gpu_pci_throughput, {
"device_identifier1": [None, True]
}],
10: [smi_api. amdsmi_dev_get_pci_replay_counter, {