Renamed API amdsmi_get_event_notification

to amdsmi_get_gpu_event_notification

grep -rli 'amdsmi_get_event_notification' * | xargs -i@ sed -i
's/amdsmi_get_event_notification/amdsmi_get_gpu_event_notification/g' @

Change-Id: I587f1fa785fabbd5347dca886636a81e3c2d1003


[ROCm/amdsmi commit: 6d6d8ce819]
This commit is contained in:
Deepak Mewar
2023-02-27 01:45:36 -05:00
committato da Naveen Krishna Chatradhi
parent 8bc7c2acc9
commit 19eefc2c69
6 ha cambiato i file con 12 aggiunte e 12 eliminazioni
+1 -1
Vedi File
@@ -3538,7 +3538,7 @@ amdsmi_status_t
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t
amdsmi_get_event_notification(int timeout_ms,
amdsmi_get_gpu_event_notification(int timeout_ms,
uint32_t *num_elem, amdsmi_evt_notification_data_t *data);
/**
@@ -323,7 +323,7 @@ class AmdSmiEventReader:
self.event_info = (
amdsmi_wrapper.amdsmi_evt_notification_data_t * num_elem)()
_check_res(
amdsmi_wrapper. amdsmi_get_event_notification(
amdsmi_wrapper. amdsmi_get_gpu_event_notification(
ctypes.c_int(timestamp),
ctypes.byref(ctypes.c_uint32(num_elem)),
self.event_info,
@@ -1658,9 +1658,9 @@ amdsmi_init_event_notification.argtypes = [amdsmi_processor_handle]
amdsmi_set_event_notification_mask = _libraries['libamd_smi.so'].amdsmi_set_event_notification_mask
amdsmi_set_event_notification_mask.restype = amdsmi_status_t
amdsmi_set_event_notification_mask.argtypes = [amdsmi_processor_handle, uint64_t]
amdsmi_get_event_notification = _libraries['libamd_smi.so'].amdsmi_get_event_notification
amdsmi_get_event_notification.restype = amdsmi_status_t
amdsmi_get_event_notification.argtypes = [ctypes.c_int32, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(struct_c__SA_amdsmi_evt_notification_data_t)]
amdsmi_get_gpu_event_notification = _libraries['libamd_smi.so'].amdsmi_get_gpu_event_notification
amdsmi_get_gpu_event_notification.restype = amdsmi_status_t
amdsmi_get_gpu_event_notification.argtypes = [ctypes.c_int32, ctypes.POINTER(ctypes.c_uint32), ctypes.POINTER(struct_c__SA_amdsmi_evt_notification_data_t)]
amdsmi_stop_event_notification = _libraries['libamd_smi.so'].amdsmi_stop_event_notification
amdsmi_stop_event_notification.restype = amdsmi_status_t
amdsmi_stop_event_notification.argtypes = [amdsmi_processor_handle]
@@ -1902,7 +1902,7 @@ __all__ = \
'amdsmi_get_processor_handle_from_bdf', 'amdsmi_get_processor_handles',
'amdsmi_get_processor_type', 'amdsmi_get_gpu_device_uuid',
'amdsmi_get_gpu_driver_version', 'amdsmi_get_gpu_ecc_error_count',
'amdsmi_get_event_notification', 'amdsmi_get_func_iter_value',
'amdsmi_get_gpu_event_notification', 'amdsmi_get_func_iter_value',
'amdsmi_get_fw_info', 'amdsmi_get_gpu_activity',
'amdsmi_get_minmax_bandwidth', 'amdsmi_get_pcie_link_caps',
'amdsmi_get_pcie_link_status', 'amdsmi_get_power_cap_info',
@@ -337,7 +337,7 @@ class Formatter:
| """ + self.style.text("48 Get is P2P accessible. Api: amdsmi_is_P2P_accessible <bdf><bdf>") + """ |
| """ + self.style.text("49 Get asic info. Api: amdsmi_get_gpu_asic_info <bdf>") + """ |
| """ + self.style.text("50 Get processor_handles. Api: amdsmi_get_processor_handles <None>") + """ |
| """ + self.style.text("51 Get event notification. Api: amdsmi_get_event_notification <bdf>") + """ |
| """ + self.style.text("51 Get event notification. Api: amdsmi_get_gpu_event_notification <bdf>") + """ |
| """ + self.style.text("52 Init event notification. Api: amdsmi_init_event_notification <bdf>") + """ |
| """ + self.style.text("53 Set event notification mask. Api: amdsmi_set_event_notification_mask <bdf><mask>") + """ |
| """ + self.style.text("54 Get event notification. Api: amdsmi_stop_event_notification <bdf>") + """ |
+1 -1
Vedi File
@@ -655,7 +655,7 @@ amdsmi_status_t
}
amdsmi_status_t
amdsmi_get_event_notification(int timeout_ms,
amdsmi_get_gpu_event_notification(int timeout_ms,
uint32_t *num_elem, amdsmi_evt_notification_data_t *data) {
AMDSMI_CHECK_INIT();
@@ -127,7 +127,7 @@ void TestEvtNotifReadWrite::Run(void) {
uint32_t num_elem = 10;
bool read_again = false;
ret = amdsmi_get_event_notification(10000, &num_elem, data);
ret = amdsmi_get_gpu_event_notification(10000, &num_elem, data);
if (ret == AMDSMI_STATUS_SUCCESS || ret == AMDSMI_STATUS_INSUFFICIENT_SIZE) {
EXPECT_LE(num_elem, 10) <<
"Expected the number of elements found to be <= buffer size (10)";
@@ -155,13 +155,13 @@ void TestEvtNotifReadWrite::Run(void) {
} else {
// This should always fail. We want to print out the return code.
EXPECT_EQ(ret, AMDSMI_STATUS_SUCCESS) <<
"Unexpected return code for amdsmi_get_event_notification()";
"Unexpected return code for amdsmi_get_gpu_event_notification()";
}
// In case GPU Pre reset event was collected in the previous read,
// read again to get the GPU Post reset event.
if (read_again) {
ret = amdsmi_get_event_notification(10000, &num_elem, data);
ret = amdsmi_get_gpu_event_notification(10000, &num_elem, data);
if (ret == AMDSMI_STATUS_SUCCESS || ret == AMDSMI_STATUS_INSUFFICIENT_SIZE) {
EXPECT_LE(num_elem, 10) <<
"Expected the number of elements found to be <= buffer size (10)";
@@ -186,7 +186,7 @@ void TestEvtNotifReadWrite::Run(void) {
} else {
// This should always fail. We want to print out the return code.
EXPECT_EQ(ret, AMDSMI_STATUS_SUCCESS) <<
"Unexpected return code for amdsmi_get_event_notification()";
"Unexpected return code for amdsmi_get_gpu_event_notification()";
}
}