Renamed API amdsmi_control_counter
to amdsmi_gpu_control_counter grep -rli 'amdsmi_control_counter' * | xargs -i@ sed -i 's/amdsmi_control_counter/amdsmi_gpu_control_counter/g' @ Change-Id: Ibdcd32327ebd2646375fb5c3b913cb528ac8aa97
This commit is contained in:
zatwierdzone przez
Naveen Krishna Chatradhi
rodzic
e6dd8d49ba
commit
6e1a72d2c1
@@ -2316,7 +2316,7 @@ try:
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
## amdsmi_control_counter
|
||||
## amdsmi_gpu_control_counter
|
||||
Description: Issue performance counter control commands
|
||||
|
||||
Input parameters:
|
||||
@@ -2326,7 +2326,7 @@ Input parameters:
|
||||
|
||||
Output: None
|
||||
|
||||
Exceptions that can be thrown by `amdsmi_control_counter` function:
|
||||
Exceptions that can be thrown by `amdsmi_gpu_control_counter` function:
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
* `AmdSmiParameterException`
|
||||
@@ -2340,7 +2340,7 @@ try:
|
||||
else:
|
||||
for device in devices:
|
||||
event_handle = amdsmi_gpu_create_counter(device, AmdSmiEventType.XGMI_1_REQUEST_TX)
|
||||
amdsmi_control_counter(event_handle, AmdSmiCounterCommand.CMD_START)
|
||||
amdsmi_gpu_control_counter(event_handle, AmdSmiCounterCommand.CMD_START)
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
|
||||
@@ -119,7 +119,7 @@ from .amdsmi_interface import amdsmi_get_gpu_power_profile_presets
|
||||
from .amdsmi_interface import amdsmi_gpu_counter_group_supported
|
||||
from .amdsmi_interface import amdsmi_gpu_create_counter
|
||||
from .amdsmi_interface import amdsmi_gpu_destroy_counter
|
||||
from .amdsmi_interface import amdsmi_control_counter
|
||||
from .amdsmi_interface import amdsmi_gpu_control_counter
|
||||
from .amdsmi_interface import amdsmi_read_counter
|
||||
from .amdsmi_interface import amdsmi_counter_get_available_counters
|
||||
|
||||
|
||||
@@ -1390,7 +1390,7 @@ def amdsmi_gpu_destroy_counter(event_handle: amdsmi_wrapper.amdsmi_event_handle_
|
||||
_check_res(amdsmi_wrapper.amdsmi_gpu_destroy_counter(event_handle))
|
||||
|
||||
|
||||
def amdsmi_control_counter(
|
||||
def amdsmi_gpu_control_counter(
|
||||
event_handle: amdsmi_wrapper.amdsmi_event_handle_t,
|
||||
counter_command: AmdSmiCounterCommand,
|
||||
):
|
||||
@@ -1403,7 +1403,7 @@ def amdsmi_control_counter(
|
||||
command_args = ctypes.c_void_p()
|
||||
|
||||
_check_res(
|
||||
amdsmi_wrapper.amdsmi_control_counter(
|
||||
amdsmi_wrapper.amdsmi_gpu_control_counter(
|
||||
event_handle, counter_command, command_args
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1598,9 +1598,9 @@ amdsmi_gpu_create_counter.argtypes = [amdsmi_processor_handle, amdsmi_event_type
|
||||
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)]
|
||||
amdsmi_gpu_control_counter = _libraries['libamd_smi.so'].amdsmi_gpu_control_counter
|
||||
amdsmi_gpu_control_counter.restype = amdsmi_status_t
|
||||
amdsmi_gpu_control_counter.argtypes = [amdsmi_event_handle_t, amdsmi_counter_command_t, ctypes.POINTER(None)]
|
||||
amdsmi_read_counter = _libraries['libamd_smi.so'].amdsmi_read_counter
|
||||
amdsmi_read_counter.restype = amdsmi_status_t
|
||||
amdsmi_read_counter.argtypes = [amdsmi_event_handle_t, ctypes.POINTER(struct_c__SA_amdsmi_counter_value_t)]
|
||||
@@ -1845,7 +1845,7 @@ __all__ = \
|
||||
'amdsmi_bdf_t', 'amdsmi_bit_field_t', 'amdsmi_board_info_t',
|
||||
'amdsmi_clk_measure_t', 'amdsmi_clk_type_t',
|
||||
'amdsmi_clk_type_t__enumvalues', 'amdsmi_container_types_t',
|
||||
'amdsmi_container_types_t__enumvalues', 'amdsmi_control_counter',
|
||||
'amdsmi_container_types_t__enumvalues', 'amdsmi_gpu_control_counter',
|
||||
'amdsmi_counter_command_t',
|
||||
'amdsmi_counter_command_t__enumvalues',
|
||||
'amdsmi_counter_get_available_counters', 'amdsmi_counter_value_t',
|
||||
|
||||
@@ -346,7 +346,7 @@ class Formatter:
|
||||
| """ + self.style.text("57 Get fw info. Api: amdsmi_get_fw_info <bdf>") + """ |
|
||||
| """ + self.style.text("58 Get vbios info. Api: amdsmi_get_gpu_vbios_info <bdf>") + """ |
|
||||
| """ + self.style.text("59 Get counter available counters. Api: amdsmi_counter_get_available_counters <bdf>") + """ |
|
||||
| """ + self.style.text("60 Get counter control. Api: amdsmi_control_counter <bdf>") + """ |
|
||||
| """ + self.style.text("60 Get counter control. Api: amdsmi_gpu_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_gpu_counter_group_supported <bdf>") + """ |
|
||||
@@ -595,7 +595,7 @@ def amdsmi_tool_counter_control(dev):
|
||||
for counter_command in smi_api.AmdSmiCounterCommand:
|
||||
try:
|
||||
event_handle = smi_api.amdsmi_gpu_create_counter(dev, event_type)
|
||||
value = smi_api.amdsmi_control_counter(event_handle, counter_command)
|
||||
value = smi_api.amdsmi_gpu_control_counter(event_handle, counter_command)
|
||||
result.update({event_type.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{}:\t{}".format(event_type.name, e))
|
||||
|
||||
Reference in New Issue
Block a user