Renamed API amdsmi_dev_get_pci_bandwidth to

amdsmi_get_gpu_pci_bandwidth

grep -rli 'amdsmi_dev_get_pci_bandwidth' * | xargs -i@ sed -i
's/amdsmi_dev_get_pci_bandwidth/amdsmi_get_gpu_pci_bandwidth/g' @

Change-Id: I43e5fc475f933b33770b6c2244232fca811c2036


[ROCm/amdsmi commit: 9b76d64944]
This commit is contained in:
Deepak Mewar
2023-02-25 07:24:40 -05:00
committed by Naveen Krishna Chatradhi
parent 0bd6f365bc
commit e53fdb26ca
10 changed files with 23 additions and 23 deletions
+3 -3
View File
@@ -1355,7 +1355,7 @@ except AmdSmiException as e:
```
## amdsmi_dev_get_pci_bandwidth
## amdsmi_get_gpu_pci_bandwidth
Description: Get the list of possible PCIe bandwidths that are available.
Input parameters:
@@ -1378,7 +1378,7 @@ Field | Content
`current` | current
`frequency` | list of frequency
Exceptions that can be thrown by `amdsmi_dev_get_pci_bandwidth` function:
Exceptions that can be thrown by `amdsmi_get_gpu_pci_bandwidth` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
* `AmdSmiParameterException`
@@ -1391,7 +1391,7 @@ try:
print("No GPUs on machine")
else:
for device in devices:
bandwidth = amdsmi_dev_get_pci_bandwidth(device)
bandwidth = amdsmi_get_gpu_pci_bandwidth(device)
print(bandwidth)
except AmdSmiException as e:
print(e)
+1 -1
View File
@@ -138,7 +138,7 @@ 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_dev_get_pci_bandwidth
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
from .amdsmi_interface import amdsmi_topo_get_numa_affinity
@@ -1742,7 +1742,7 @@ def _format_transfer_rate(transfer_rate):
}
def amdsmi_dev_get_pci_bandwidth(processor_handle: amdsmi_wrapper.amdsmi_processor_handle):
def amdsmi_get_gpu_pci_bandwidth(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
@@ -1751,7 +1751,7 @@ def amdsmi_dev_get_pci_bandwidth(processor_handle: amdsmi_wrapper.amdsmi_process
bandwidth = amdsmi_wrapper.amdsmi_pcie_bandwidth_t()
_check_res(
amdsmi_wrapper.amdsmi_dev_get_pci_bandwidth(
amdsmi_wrapper.amdsmi_get_gpu_pci_bandwidth(
processor_handle, ctypes.byref(bandwidth))
)
@@ -1439,9 +1439,9 @@ amdsmi_get_gpu_subsystem_name.argtypes = [amdsmi_processor_handle, ctypes.POINTE
amdsmi_get_gpu_drm_render_minor = _libraries['libamd_smi.so'].amdsmi_get_gpu_drm_render_minor
amdsmi_get_gpu_drm_render_minor.restype = amdsmi_status_t
amdsmi_get_gpu_drm_render_minor.argtypes = [amdsmi_processor_handle, ctypes.POINTER(ctypes.c_uint32)]
amdsmi_dev_get_pci_bandwidth = _libraries['libamd_smi.so'].amdsmi_dev_get_pci_bandwidth
amdsmi_dev_get_pci_bandwidth.restype = amdsmi_status_t
amdsmi_dev_get_pci_bandwidth.argtypes = [amdsmi_processor_handle, ctypes.POINTER(struct_c__SA_amdsmi_pcie_bandwidth_t)]
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)]
@@ -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_dev_get_pci_bandwidth', 'amdsmi_dev_get_pci_id',
'amdsmi_get_gpu_pci_bandwidth', 'amdsmi_dev_get_pci_id',
'amdsmi_dev_get_pci_replay_counter',
'amdsmi_dev_get_pci_throughput', 'amdsmi_dev_get_perf_level',
'amdsmi_dev_get_power_ave',
@@ -294,7 +294,7 @@ class Formatter:
| """ + 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(" 8 Get device pci bandwidth. Api: amdsmi_dev_get_pci_bandwidth <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>") + """ |
| """ + self.style.text("11 Get topo numa affinity. Api: amdsmi_topo_get_numa_affinity <bdf>") + """ |
@@ -743,7 +743,7 @@ commands = {
7: [smi_api.amdsmi_dev_get_pci_id, {
"device_identifier1": [None, True]
}],
8: [smi_api.amdsmi_dev_get_pci_bandwidth, {
8: [smi_api.amdsmi_get_gpu_pci_bandwidth, {
"device_identifier1": [None, True]
}],
9: [smi_api.amdsmi_dev_get_pci_throughput, {