Renamed API amdsmi_dev_get_volt_metric to
amdsmi_get_gpu_volt_metric
grep -rli 'amdsmi_dev_get_volt_metric' * | xargs -i@ sed -i
's/amdsmi_dev_get_volt_metric/amdsmi_get_gpu_volt_metric/g' @
Change-Id: Icd34fa435d067815d83b61e84b70b1d78105f8b6
[ROCm/amdsmi commit: 1358f3cfd0]
Этот коммит содержится в:
коммит произвёл
Naveen Krishna Chatradhi
родитель
da14f8b791
Коммит
f33edadf51
@@ -1862,7 +1862,7 @@ try:
|
||||
except AmdSmiException as e:
|
||||
print(e)
|
||||
```
|
||||
## amdsmi_dev_get_volt_metric
|
||||
## amdsmi_get_gpu_volt_metric
|
||||
Description: Get the voltage metric value for the specified metric, from the
|
||||
specified voltage sensor on the specified device
|
||||
|
||||
@@ -1873,7 +1873,7 @@ Input parameters:
|
||||
|
||||
Output: Voltage as integer in millivolts
|
||||
|
||||
Exceptions that can be thrown by ` amdsmi_dev_get_volt_metric` function:
|
||||
Exceptions that can be thrown by ` amdsmi_get_gpu_volt_metric` function:
|
||||
* `AmdSmiLibraryException`
|
||||
* `AmdSmiRetryException`
|
||||
* `AmdSmiParameterException`
|
||||
@@ -1886,7 +1886,7 @@ try:
|
||||
print("No GPUs on machine")
|
||||
else:
|
||||
for device in devices:
|
||||
voltage = amdsmi_dev_get_volt_metric(device, AmdSmiVoltageType.VDDGFX,
|
||||
voltage = amdsmi_get_gpu_volt_metric(device, AmdSmiVoltageType.VDDGFX,
|
||||
AmdSmiVoltageMetric.AVERAGE)
|
||||
print(voltage)
|
||||
except AmdSmiException as e:
|
||||
|
||||
@@ -101,7 +101,7 @@ from .amdsmi_interface import amdsmi_get_gpu_fan_rpms
|
||||
from .amdsmi_interface import amdsmi_get_gpu_fan_speed
|
||||
from .amdsmi_interface import amdsmi_get_gpu_fan_speed_max
|
||||
from .amdsmi_interface import amdsmi_get_temp_metric
|
||||
from .amdsmi_interface import amdsmi_dev_get_volt_metric
|
||||
from .amdsmi_interface import amdsmi_get_gpu_volt_metric
|
||||
|
||||
# # Clock, Power and Performance Query
|
||||
from .amdsmi_interface import amdsmi_dev_get_busy_percent
|
||||
|
||||
@@ -2141,7 +2141,7 @@ def amdsmi_get_temp_metric(
|
||||
return temp_value.value
|
||||
|
||||
|
||||
def amdsmi_dev_get_volt_metric(
|
||||
def amdsmi_get_gpu_volt_metric(
|
||||
processor_handle: amdsmi_wrapper.amdsmi_processor_handle,
|
||||
sensor_type: AmdSmiVoltageType,
|
||||
metric: AmdSmiVoltageMetric,
|
||||
@@ -2157,7 +2157,7 @@ def amdsmi_dev_get_volt_metric(
|
||||
|
||||
voltage = ctypes.c_int64()
|
||||
_check_res(
|
||||
amdsmi_wrapper. amdsmi_dev_get_volt_metric(
|
||||
amdsmi_wrapper. amdsmi_get_gpu_volt_metric(
|
||||
processor_handle, sensor_type, metric, ctypes.byref(voltage)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1499,9 +1499,9 @@ amdsmi_get_gpu_fan_speed_max.argtypes = [amdsmi_processor_handle, uint32_t, ctyp
|
||||
amdsmi_get_temp_metric = _libraries['libamd_smi.so'].amdsmi_get_temp_metric
|
||||
amdsmi_get_temp_metric.restype = amdsmi_status_t
|
||||
amdsmi_get_temp_metric.argtypes = [amdsmi_processor_handle, amdsmi_temperature_type_t, amdsmi_temperature_metric_t, ctypes.POINTER(ctypes.c_int64)]
|
||||
amdsmi_dev_get_volt_metric = _libraries['libamd_smi.so'].amdsmi_dev_get_volt_metric
|
||||
amdsmi_dev_get_volt_metric.restype = amdsmi_status_t
|
||||
amdsmi_dev_get_volt_metric.argtypes = [amdsmi_processor_handle, amdsmi_voltage_type_t, amdsmi_voltage_metric_t, ctypes.POINTER(ctypes.c_int64)]
|
||||
amdsmi_get_gpu_volt_metric = _libraries['libamd_smi.so'].amdsmi_get_gpu_volt_metric
|
||||
amdsmi_get_gpu_volt_metric.restype = amdsmi_status_t
|
||||
amdsmi_get_gpu_volt_metric.argtypes = [amdsmi_processor_handle, amdsmi_voltage_type_t, amdsmi_voltage_metric_t, ctypes.POINTER(ctypes.c_int64)]
|
||||
amdsmi_dev_reset_fan = _libraries['libamd_smi.so'].amdsmi_dev_reset_fan
|
||||
amdsmi_dev_reset_fan.restype = amdsmi_status_t
|
||||
amdsmi_dev_reset_fan.argtypes = [amdsmi_processor_handle, uint32_t]
|
||||
@@ -1869,7 +1869,7 @@ __all__ = \
|
||||
'amdsmi_dev_get_power_profile_presets',
|
||||
'amdsmi_get_gpu_subsystem_id', 'amdsmi_get_gpu_subsystem_name',
|
||||
'amdsmi_get_temp_metric', 'amdsmi_get_gpu_vendor_name',
|
||||
'amdsmi_dev_get_volt_metric', 'amdsmi_get_gpu_vram_vendor',
|
||||
'amdsmi_get_gpu_volt_metric', 'amdsmi_get_gpu_vram_vendor',
|
||||
'amdsmi_dev_open_supported_func_iterator',
|
||||
'amdsmi_dev_open_supported_variant_iterator',
|
||||
'amdsmi_dev_perf_level_t', 'amdsmi_dev_perf_level_t__enumvalues',
|
||||
|
||||
@@ -308,7 +308,7 @@ class Formatter:
|
||||
| """ + self.style.text("19 Get device fan speed. Api: amdsmi_get_gpu_fan_speed <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("20 Get device fan speed max. Api: amdsmi_get_gpu_fan_speed_max <bdf><sensor_idx>") + """ |
|
||||
| """ + self.style.text("21 Get device temp metric. Api: amdsmi_get_temp_metric <bdf>") + """ |
|
||||
| """ + self.style.text("22 Get device volt metric. Api: amdsmi_dev_get_volt_metric <bdf>") + """ |
|
||||
| """ + self.style.text("22 Get device volt metric. Api: amdsmi_get_gpu_volt_metric <bdf>") + """ |
|
||||
| """ + self.style.text("23 Get device busy percent. Api: amdsmi_dev_get_busy_percent <bdf>") + """ |
|
||||
| """ + self.style.text("24 Get utilization count. Api: amdsmi_get_utilization_count <bdf>") + """ |
|
||||
| """ + self.style.text("25 Get device perf level. Api: amdsmi_dev_get_perf_level <bdf>") + """ |
|
||||
@@ -430,7 +430,7 @@ def amdsmi_tool_dev_volt_metric_get(dev):
|
||||
for voltage_type in smi_api.AmdSmiVoltageType:
|
||||
for voltage_metric in smi_api.AmdSmiVoltageMetric:
|
||||
try:
|
||||
value = smi_api. amdsmi_dev_get_volt_metric(dev, voltage_type, voltage_metric)
|
||||
value = smi_api. amdsmi_get_gpu_volt_metric(dev, voltage_type, voltage_metric)
|
||||
result.update({"AmdSmiVoltageType: " + voltage_type.name + ", AmdSmiVoltageMetric: " + voltage_metric.name: value})
|
||||
except smi_api.AmdSmiException as e:
|
||||
print("{},{}:\t{}".format(voltage_type.name, voltage_metric.name, e))
|
||||
|
||||
Ссылка в новой задаче
Block a user