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]
Este commit está contenido en:
Deepak Mewar
2023-02-25 07:39:10 -05:00
cometido por Naveen Krishna Chatradhi
padre 52c0195b86
commit 642986764b
Se han modificado 9 ficheros con 18 adiciones y 18 borrados
+1 -1
Ver fichero
@@ -1553,7 +1553,7 @@ amdsmi_status_t amdsmi_get_gpu_topo_numa_affinity(amdsmi_processor_handle proces
*
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t amdsmi_dev_get_pci_throughput(amdsmi_processor_handle processor_handle, uint64_t *sent,
amdsmi_status_t amdsmi_get_gpu_pci_throughput(amdsmi_processor_handle processor_handle, uint64_t *sent,
uint64_t *received, uint64_t *max_pkt_sz);
/**
+3 -3
Ver fichero
@@ -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)
+1 -1
Ver fichero
@@ -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))
)
+4 -4
Ver fichero
@@ -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',
+2 -2
Ver fichero
@@ -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, {
+2 -2
Ver fichero
@@ -903,7 +903,7 @@ amdsmi_get_func_iter_value(amdsmi_func_id_iter_handle_t handle,
{"rsmi_dev_unique_id_get", "amdsmi_get_gpu_board_info"},
{"rsmi_dev_pci_bandwidth_get", "amdsmi_get_gpu_pci_bandwidth"},
{"rsmi_dev_pci_id_get", "amdsmi_get_gpu_pci_id"},
{"rsmi_dev_pci_throughput_get", "amdsmi_dev_get_pci_throughput"},
{"rsmi_dev_pci_throughput_get", "amdsmi_get_gpu_pci_throughput"},
{"rsmi_dev_pci_replay_counter_get", " amdsmi_dev_get_pci_replay_counter"},
{"rsmi_dev_pci_bandwidth_set", " amdsmi_dev_set_pci_bandwidth"},
{"rsmi_dev_power_profile_set", " amdsmi_dev_set_power_profile"},
@@ -1295,7 +1295,7 @@ amdsmi_status_t amdsmi_dev_get_pci_replay_counter(
return rsmi_wrapper(rsmi_dev_pci_replay_counter_get,
processor_handle, counter);
}
amdsmi_status_t amdsmi_dev_get_pci_throughput(
amdsmi_status_t amdsmi_get_gpu_pci_throughput(
amdsmi_processor_handle processor_handle,
uint64_t *sent, uint64_t *received, uint64_t *max_pkt_sz) {
return rsmi_wrapper(rsmi_dev_pci_throughput_get, processor_handle,
@@ -217,7 +217,7 @@ void TestMutualExclusion::Run(void) {
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
ret = amdsmi_get_gpu_pci_id(processor_handles_[0], &dmy_ui64);
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
ret = amdsmi_dev_get_pci_throughput(processor_handles_[0], &dmy_ui64, &dmy_ui64, &dmy_ui64);
ret = amdsmi_get_gpu_pci_throughput(processor_handles_[0], &dmy_ui64, &dmy_ui64, &dmy_ui64);
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
ret = amdsmi_dev_get_pci_replay_counter(processor_handles_[0], &dmy_ui64);
CHECK_RET(ret, AMDSMI_STATUS_BUSY);
@@ -271,7 +271,7 @@ void TestMutualExclusion::Run(void) {
amdsmi_get_gpu_vendor_name
amdsmi_get_gpu_pci_bandwidth
amdsmi_dev_set_pci_bandwidth
amdsmi_dev_get_pci_throughput
amdsmi_get_gpu_pci_throughput
amdsmi_dev_get_temp_metric
amdsmi_dev_get_volt_metric
amdsmi_dev_get_fan_speed
@@ -120,7 +120,7 @@ void TestPciReadWrite::Run(void) {
ASSERT_EQ(ret, AMDSMI_STATUS_INVAL);
}
ret = amdsmi_dev_get_pci_throughput(processor_handles_[dv_ind], &sent, &received, &max_pkt_sz);
ret = amdsmi_get_gpu_pci_throughput(processor_handles_[dv_ind], &sent, &received, &max_pkt_sz);
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
std::cout << "TEST FAILURE: Current PCIe throughput is not detected. "
"This is likely because it is not indicated in the pcie_bw sysfs "