Renamed API amdsmi_dev_counter_group_supported

to amdsmi_gpu_counter_group_supported

grep -rli 'amdsmi_dev_counter_group_supported' * | xargs -i@ sed -i
's/amdsmi_dev_counter_group_supported/amdsmi_gpu_counter_group_supported/g' @

Change-Id: I69a5534f779dc0013bbe75b3d9b2c6074b2f378b


[ROCm/amdsmi commit: fb419ab655]
This commit is contained in:
Deepak Mewar
2023-02-27 02:00:14 -05:00
committed by Naveen Krishna Chatradhi
parent 370168e42c
commit 22ad287cbf
9 changed files with 20 additions and 20 deletions
+3 -3
View File
@@ -2765,7 +2765,7 @@ amdsmi_status_string(amdsmi_status_t status, const char **status_string);
* The types of events available and the ability to count those
* events are dependent on which device is being targeted and if counters are
* still available for that device, respectively.
* ::amdsmi_dev_counter_group_supported() can be used to see which event types
* ::amdsmi_gpu_counter_group_supported() can be used to see which event types
* (::amdsmi_event_group_t) are supported for a given device. Assuming a device
* supports a given event type, we can then check to see if there are counters
* available to count a specific event with
@@ -2811,7 +2811,7 @@ amdsmi_status_string(amdsmi_status_t status, const char **status_string);
* amdsmi_counter_value_t value;
*
* // Determine if AMDSMI_EVNT_GRP_XGMI is supported for device dv_ind
* ret = amdsmi_dev_counter_group_supported(dv_ind, AMDSMI_EVNT_GRP_XGMI);
* ret = amdsmi_gpu_counter_group_supported(dv_ind, AMDSMI_EVNT_GRP_XGMI);
*
* // See if there are counters available for device dv_ind for event
* // AMDSMI_EVNT_GRP_XGMI
@@ -2868,7 +2868,7 @@ amdsmi_status_string(amdsmi_status_t status, const char **status_string);
* @return ::amdsmi_status_t | ::AMDSMI_STATUS_SUCCESS on success, non-zero on fail
*/
amdsmi_status_t
amdsmi_dev_counter_group_supported(amdsmi_processor_handle processor_handle, amdsmi_event_group_t group);
amdsmi_gpu_counter_group_supported(amdsmi_processor_handle processor_handle, amdsmi_event_group_t group);
/**
* @brief Create a performance counter object
+3 -3
View File
@@ -2234,7 +2234,7 @@ except AmdSmiException as e:
print(e)
```
## amdsmi_dev_counter_group_supported
## amdsmi_gpu_counter_group_supported
Description: Tell if an event group is supported by a given device
Input parameters:
@@ -2244,7 +2244,7 @@ Input parameters:
Output: None
Exceptions that can be thrown by `amdsmi_dev_counter_group_supported` function:
Exceptions that can be thrown by `amdsmi_gpu_counter_group_supported` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
* `AmdSmiParameterException`
@@ -2257,7 +2257,7 @@ try:
print("No GPUs on machine")
else:
for device in devices:
amdsmi_dev_counter_group_supported(device, AmdSmiEventGroup.XGMI)
amdsmi_gpu_counter_group_supported(device, AmdSmiEventGroup.XGMI)
except AmdSmiException as e:
print(e)
```
+1 -1
View File
@@ -116,7 +116,7 @@ from .amdsmi_interface import amdsmi_dev_get_od_volt_curve_regions
from .amdsmi_interface import amdsmi_get_gpu_power_profile_presets
# # Performance Counters
from .amdsmi_interface import amdsmi_dev_counter_group_supported
from .amdsmi_interface import amdsmi_gpu_counter_group_supported
from .amdsmi_interface import amdsmi_dev_create_counter
from .amdsmi_interface import amdsmi_dev_destroy_counter
from .amdsmi_interface import amdsmi_control_counter
@@ -1344,7 +1344,7 @@ def amdsmi_get_xgmi_info(processor_handle: amdsmi_wrapper.amdsmi_processor_handl
}
def amdsmi_dev_counter_group_supported(
def amdsmi_gpu_counter_group_supported(
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
event_group: AmdSmiEventGroup,
):
@@ -1356,7 +1356,7 @@ def amdsmi_dev_counter_group_supported(
raise AmdSmiParameterException(event_group, AmdSmiEventGroup)
_check_res(
amdsmi_wrapper.amdsmi_dev_counter_group_supported(
amdsmi_wrapper.amdsmi_gpu_counter_group_supported(
processor_handle, event_group)
)
@@ -1589,9 +1589,9 @@ amdsmi_dev_get_gpu_ecc_status.argtypes = [amdsmi_processor_handle, amdsmi_gpu_bl
amdsmi_status_string = _libraries['libamd_smi.so'].amdsmi_status_string
amdsmi_status_string.restype = amdsmi_status_t
amdsmi_status_string.argtypes = [amdsmi_status_t, ctypes.POINTER(ctypes.POINTER(ctypes.c_char))]
amdsmi_dev_counter_group_supported = _libraries['libamd_smi.so'].amdsmi_dev_counter_group_supported
amdsmi_dev_counter_group_supported.restype = amdsmi_status_t
amdsmi_dev_counter_group_supported.argtypes = [amdsmi_processor_handle, amdsmi_event_group_t]
amdsmi_gpu_counter_group_supported = _libraries['libamd_smi.so'].amdsmi_gpu_counter_group_supported
amdsmi_gpu_counter_group_supported.restype = amdsmi_status_t
amdsmi_gpu_counter_group_supported.argtypes = [amdsmi_processor_handle, amdsmi_event_group_t]
amdsmi_dev_create_counter = _libraries['libamd_smi.so'].amdsmi_dev_create_counter
amdsmi_dev_create_counter.restype = amdsmi_status_t
amdsmi_dev_create_counter.argtypes = [amdsmi_processor_handle, amdsmi_event_type_t, ctypes.POINTER(ctypes.c_uint64)]
@@ -1850,7 +1850,7 @@ __all__ = \
'amdsmi_counter_command_t__enumvalues',
'amdsmi_counter_get_available_counters', 'amdsmi_counter_value_t',
'amdsmi_dev_close_supported_func_iterator',
'amdsmi_dev_counter_group_supported', 'amdsmi_dev_create_counter',
'amdsmi_gpu_counter_group_supported', 'amdsmi_dev_create_counter',
'amdsmi_dev_destroy_counter', 'amdsmi_get_busy_percent',
'amdsmi_get_gpu_drm_render_minor', 'amdsmi_dev_get_gpu_ecc_count',
'amdsmi_dev_get_gpu_ecc_enabled', 'amdsmi_dev_get_gpu_ecc_status',
@@ -349,7 +349,7 @@ class Formatter:
| """ + self.style.text("60 Get counter control. Api: amdsmi_control_counter <bdf>") + """ |
| """ + self.style.text("61 Get counter read. Api: amdsmi_read_counter <bdf>") + """ |
| """ + self.style.text("62 Set dev clk range. Api: amdsmi_set_gpu_clk_range <bdf><min_clk><max_clk>") + """ |
| """ + self.style.text("63 Get dev counter group supported. Api: amdsmi_dev_counter_group_supported <bdf>") + """ |
| """ + self.style.text("63 Get dev counter group supported. Api: amdsmi_gpu_counter_group_supported <bdf>") + """ |
| """ + self.style.text("64 Reset dev fan. Api: amdsmi_reset_gpu_fan <bdf><sensor_idx>") + """ |
| """ + self.style.text("65 Set dev fan speed. Api: amdsmi_set_gpu_fan_speed <bdf><sensor_idx><fan_speed>") + """ |
| """ + self.style.text("66 Set dev gpu clk freq. Api: amdsmi_set_clk_freq <bdf><freq_bitmask>") + """ |
@@ -631,7 +631,7 @@ def amdsmi_tool_dev_counter_group_supported(dev):
result = {}
for event_group in smi_api.AmdSmiEventGroup:
try:
value = smi_api.amdsmi_dev_counter_group_supported(dev, event_group)
value = smi_api.amdsmi_gpu_counter_group_supported(dev, event_group)
result.update({event_group.name: value})
except smi_api.AmdSmiException as e:
print("{}:\t{}".format(event_group.name, e))
+2 -2
View File
@@ -690,7 +690,7 @@ amdsmi_status_t amdsmi_stop_gpu_event_notification(
return rsmi_wrapper(rsmi_event_notification_stop, processor_handle);
}
amdsmi_status_t amdsmi_dev_counter_group_supported(
amdsmi_status_t amdsmi_gpu_counter_group_supported(
amdsmi_processor_handle processor_handle, amdsmi_event_group_t group) {
return rsmi_wrapper(rsmi_dev_counter_group_supported, processor_handle,
static_cast<rsmi_event_group_t>(group));
@@ -923,7 +923,7 @@ amdsmi_get_func_iter_value(amdsmi_func_id_iter_handle_t handle,
{"rsmi_dev_od_volt_curve_regions_get", " amdsmi_dev_get_od_volt_curve_regions"},
{"rsmi_dev_ecc_enabled_get", " amdsmi_dev_get_gpu_ecc_enabled"},
{"rsmi_dev_ecc_status_get", " amdsmi_dev_get_gpu_ecc_status"},
{"rsmi_dev_counter_group_supported", "amdsmi_dev_counter_group_supported"},
{"rsmi_dev_counter_group_supported", "amdsmi_gpu_counter_group_supported"},
{"rsmi_dev_counter_create", "amdsmi_dev_create_counter"},
{"rsmi_dev_xgmi_error_status", "amdsmi_dev_xgmi_error_status"},
{"rsmi_dev_xgmi_error_reset", "amdsmi_dev_reset_xgmi_error"},
@@ -299,7 +299,7 @@ void TestMutualExclusion::Run(void) {
amdsmi_dev_unique_id_get
amdsmi_dev_create_counter
amdsmi_counter_get_available_counters
amdsmi_dev_counter_group_supported
amdsmi_gpu_counter_group_supported
amdsmi_get_gpu_memory_reserved_pages
amdsmi_dev_xgmi_error_status
amdsmi_dev_reset_xgmi_error
@@ -202,7 +202,7 @@ TestPerfCntrReadWrite::testEventsIndividually(amdsmi_processor_handle dv_ind) {
std::cout << "****************************" << std::endl;
}
for (PerfCntrEvtGrp grp : s_event_groups) {
ret = amdsmi_dev_counter_group_supported(dv_ind, grp.group());
ret = amdsmi_gpu_counter_group_supported(dv_ind, grp.group());
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
continue;
}
@@ -248,7 +248,7 @@ TestPerfCntrReadWrite::testEventsSimultaneously(amdsmi_processor_handle dv_ind)
* handling 1 event at a time.
*/
for (PerfCntrEvtGrp grp : s_event_groups) {
ret = amdsmi_dev_counter_group_supported(dv_ind, grp.group());
ret = amdsmi_gpu_counter_group_supported(dv_ind, grp.group());
if (ret == AMDSMI_STATUS_NOT_SUPPORTED) {
IF_VERB(STANDARD) {
std::cout << "\tEvent Group " << grp.name() <<