Renamed API amdsmi_dev_get_pci_replay_counter to

amdsmi_get_gpu_pci_replay_counter

grep -rli 'amdsmi_dev_get_pci_replay_counter' * | xargs -i@ sed -i
's/amdsmi_dev_get_pci_replay_counter/amdsmi_get_gpu_pci_replay_counter/g' @

Change-Id: Ic6ad26e35cb6cf73f87a71d39abf38d3afac4be4
This commit is contained in:
Deepak Mewar
2023-02-25 07:41:03 -05:00
committed by Naveen Krishna Chatradhi
orang tua 931099683b
melakukan d8e22b9687
9 mengubah file dengan 21 tambahan dan 21 penghapusan
+3 -3
Melihat File
@@ -1431,7 +1431,7 @@ except AmdSmiException as e:
print(e)
```
## amdsmi_dev_get_pci_replay_counter
## amdsmi_get_gpu_pci_replay_counter
Description: Get PCIe replay counter
@@ -1442,7 +1442,7 @@ Input parameters:
Output: counter value
The sum of the NAK's received and generated by the GPU
Exceptions that can be thrown by ` amdsmi_dev_get_pci_replay_counter` function:
Exceptions that can be thrown by ` amdsmi_get_gpu_pci_replay_counter` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
* `AmdSmiParameterException`
@@ -1455,7 +1455,7 @@ try:
print("No GPUs on machine")
else:
for device in devices:
counter = amdsmi_dev_get_pci_replay_counter(device)
counter = amdsmi_get_gpu_pci_replay_counter(device)
print(counter)
except AmdSmiException as e:
print(e)
+1 -1
Melihat File
@@ -140,7 +140,7 @@ from .amdsmi_interface import amdsmi_dev_reset_xgmi_error
from .amdsmi_interface import amdsmi_get_gpu_pci_id
from .amdsmi_interface import amdsmi_get_gpu_pci_bandwidth
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_pci_replay_counter
from .amdsmi_interface import amdsmi_get_gpu_topo_numa_affinity
# # Power information
+2 -2
Melihat File
@@ -1785,7 +1785,7 @@ def amdsmi_get_gpu_pci_throughput(processor_handle: amdsmi_wrapper.amdsmi_proces
}
def amdsmi_dev_get_pci_replay_counter(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
def amdsmi_get_gpu_pci_replay_counter(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
@@ -1794,7 +1794,7 @@ def amdsmi_dev_get_pci_replay_counter(processor_handle: amdsmi_wrapper.amdsmi_pr
counter = ctypes.c_uint64()
_check_res(
amdsmi_wrapper. amdsmi_dev_get_pci_replay_counter(
amdsmi_wrapper. amdsmi_get_gpu_pci_replay_counter(
processor_handle, ctypes.byref(counter))
)
+4 -4
Melihat File
@@ -1451,9 +1451,9 @@ amdsmi_get_gpu_topo_numa_affinity.argtypes = [amdsmi_processor_handle, ctypes.PO
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)]
amdsmi_get_gpu_pci_replay_counter = _libraries['libamd_smi.so'].amdsmi_get_gpu_pci_replay_counter
amdsmi_get_gpu_pci_replay_counter.restype = amdsmi_status_t
amdsmi_get_gpu_pci_replay_counter.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint64)]
amdsmi_dev_set_pci_bandwidth = _libraries['libamd_smi.so'].amdsmi_dev_set_pci_bandwidth
amdsmi_dev_set_pci_bandwidth.restype = amdsmi_status_t
amdsmi_dev_set_pci_bandwidth.argtypes = [amdsmi_processor_handle, uint64_t]
@@ -1863,7 +1863,7 @@ __all__ = \
'amdsmi_dev_get_od_volt_curve_regions',
'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_get_gpu_pci_replay_counter',
'amdsmi_get_gpu_pci_throughput', 'amdsmi_dev_get_perf_level',
'amdsmi_dev_get_power_ave',
'amdsmi_dev_get_power_profile_presets',
+2 -2
Melihat File
@@ -296,7 +296,7 @@ class Formatter:
| """ + 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_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("10 Get device pci replay counter. Api: amdsmi_get_gpu_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>") + """ |
| """ + self.style.text("13 Get device energy count. Api: amdsmi_dev_get_energy_count <bdf>") + """ |
@@ -749,7 +749,7 @@ commands = {
9: [smi_api.amdsmi_get_gpu_pci_throughput, {
"device_identifier1": [None, True]
}],
10: [smi_api. amdsmi_dev_get_pci_replay_counter, {
10: [smi_api. amdsmi_get_gpu_pci_replay_counter, {
"device_identifier1": [None, True]
}],
11: [smi_api.amdsmi_get_gpu_topo_numa_affinity, {