Renamed API amdsmi_dev_destroy_counter

to amdsmi_gpu_destroy_counter

grep -rli 'amdsmi_dev_destroy_counter' * | xargs -i@ sed -i
's/amdsmi_dev_destroy_counter/amdsmi_gpu_destroy_counter/g' @

Change-Id: I328f65f5a2a86108ee5b217f95ed0f4f03745286
This commit is contained in:
Deepak Mewar
2023-02-27 02:03:20 -05:00
committed by Naveen Krishna Chatradhi
parent 0c435b81c2
commit e6dd8d49ba
7 changed files with 17 additions and 17 deletions
+3 -3
View File
@@ -2289,7 +2289,7 @@ try:
except AmdSmiException as e:
print(e)
```
## amdsmi_dev_destroy_counter
## amdsmi_gpu_destroy_counter
Description: Destroys a performance counter object
Input parameters:
@@ -2298,7 +2298,7 @@ Input parameters:
Output: None
Exceptions that can be thrown by `amdsmi_dev_destroy_counter` function:
Exceptions that can be thrown by `amdsmi_gpu_destroy_counter` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
* `AmdSmiParameterException`
@@ -2312,7 +2312,7 @@ try:
else:
for device in devices:
event_handle = amdsmi_gpu_create_counter(device, AmdSmiEventGroup.XGMI)
amdsmi_dev_destroy_counter(event_handle)
amdsmi_gpu_destroy_counter(event_handle)
except AmdSmiException as e:
print(e)
```
+1 -1
View File
@@ -118,7 +118,7 @@ from .amdsmi_interface import amdsmi_get_gpu_power_profile_presets
# # Performance Counters
from .amdsmi_interface import amdsmi_gpu_counter_group_supported
from .amdsmi_interface import amdsmi_gpu_create_counter
from .amdsmi_interface import amdsmi_dev_destroy_counter
from .amdsmi_interface import amdsmi_gpu_destroy_counter
from .amdsmi_interface import amdsmi_control_counter
from .amdsmi_interface import amdsmi_read_counter
from .amdsmi_interface import amdsmi_counter_get_available_counters
+2 -2
View File
@@ -1382,12 +1382,12 @@ def amdsmi_gpu_create_counter(
return event_handle
def amdsmi_dev_destroy_counter(event_handle: amdsmi_wrapper.amdsmi_event_handle_t):
def amdsmi_gpu_destroy_counter(event_handle: amdsmi_wrapper.amdsmi_event_handle_t):
if not isinstance(event_handle, amdsmi_wrapper.amdsmi_event_handle_t):
raise AmdSmiParameterException(
event_handle, amdsmi_wrapper.amdsmi_event_handle_t
)
_check_res(amdsmi_wrapper.amdsmi_dev_destroy_counter(event_handle))
_check_res(amdsmi_wrapper.amdsmi_gpu_destroy_counter(event_handle))
def amdsmi_control_counter(
+4 -4
View File
@@ -1595,9 +1595,9 @@ amdsmi_gpu_counter_group_supported.argtypes = [amdsmi_processor_handle, amdsmi_e
amdsmi_gpu_create_counter = _libraries['libamd_smi.so'].amdsmi_gpu_create_counter
amdsmi_gpu_create_counter.restype = amdsmi_status_t
amdsmi_gpu_create_counter.argtypes = [amdsmi_processor_handle, amdsmi_event_type_t, ctypes.POINTER(ctypes.c_uint64)]
amdsmi_dev_destroy_counter = _libraries['libamd_smi.so'].amdsmi_dev_destroy_counter
amdsmi_dev_destroy_counter.restype = amdsmi_status_t
amdsmi_dev_destroy_counter.argtypes = [amdsmi_event_handle_t]
amdsmi_gpu_destroy_counter = _libraries['libamd_smi.so'].amdsmi_gpu_destroy_counter
amdsmi_gpu_destroy_counter.restype = amdsmi_status_t
amdsmi_gpu_destroy_counter.argtypes = [amdsmi_event_handle_t]
amdsmi_control_counter = _libraries['libamd_smi.so'].amdsmi_control_counter
amdsmi_control_counter.restype = amdsmi_status_t
amdsmi_control_counter.argtypes = [amdsmi_event_handle_t, amdsmi_counter_command_t, ctypes.POINTER(None)]
@@ -1851,7 +1851,7 @@ __all__ = \
'amdsmi_counter_get_available_counters', 'amdsmi_counter_value_t',
'amdsmi_dev_close_supported_func_iterator',
'amdsmi_gpu_counter_group_supported', 'amdsmi_gpu_create_counter',
'amdsmi_dev_destroy_counter', 'amdsmi_get_busy_percent',
'amdsmi_gpu_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',
'amdsmi_get_energy_count', 'amdsmi_get_gpu_fan_rpms',