Physical State Queries

Physical State Queries#

AMD SMI: Physical State Queries
Physical State Queries

Functions

amdsmi_status_t amdsmi_get_gpu_fan_rpms (amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t *speed)
 Get the fan speed in RPMs of the device with the specified processor handle and 0-based sensor index. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_get_gpu_fan_speed (amdsmi_processor_handle processor_handle, uint32_t sensor_ind, int64_t *speed)
 Get the fan speed for the specified device as a value relative to AMDSMI_MAX_FAN_SPEED. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_get_gpu_fan_speed_max (amdsmi_processor_handle processor_handle, uint32_t sensor_ind, uint64_t *max_speed)
 Get the max. fan speed of the device with provided processor handle. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_get_temp_metric (amdsmi_processor_handle processor_handle, amdsmi_temperature_type_t sensor_type, amdsmi_temperature_metric_t metric, int64_t *temperature)
 Get the temperature metric value for the specified metric, from the specified temperature sensor on the specified device. It is not supported on virtual machine guest. More...
 
amdsmi_status_t amdsmi_get_gpu_cache_info (amdsmi_processor_handle processor_handle, amdsmi_gpu_cache_info_t *info)
 Returns gpu cache info. More...
 
amdsmi_status_t amdsmi_get_gpu_volt_metric (amdsmi_processor_handle processor_handle, amdsmi_voltage_type_t sensor_type, amdsmi_voltage_metric_t metric, int64_t *voltage)
 Get the voltage metric value for the specified metric, from the specified voltage sensor on the specified device. It is not supported on virtual machine guest. More...
 

Detailed Description

These functions provide information about the physical characteristics of the device.

Function Documentation

◆ amdsmi_get_gpu_fan_rpms()

amdsmi_status_t amdsmi_get_gpu_fan_rpms ( amdsmi_processor_handle  processor_handle,
uint32_t  sensor_ind,
int64_t *  speed 
)

Get the fan speed in RPMs of the device with the specified processor handle and 0-based sensor index. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and a pointer to a uint32_t speed, this function will write the current fan speed in RPMs to the uint32_t pointed to by speed

Parameters
[in]processor_handlea processor handle
[in]sensor_inda 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.
[in,out]speeda pointer to uint32_t to which the speed will be written If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_gpu_fan_speed()

amdsmi_status_t amdsmi_get_gpu_fan_speed ( amdsmi_processor_handle  processor_handle,
uint32_t  sensor_ind,
int64_t *  speed 
)

Get the fan speed for the specified device as a value relative to AMDSMI_MAX_FAN_SPEED. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and a pointer to a uint32_t speed, this function will write the current fan speed (a value between 0 and the maximum fan speed, AMDSMI_MAX_FAN_SPEED) to the uint32_t pointed to by speed

Parameters
[in]processor_handlea processor handle
[in]sensor_inda 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.
[in,out]speeda pointer to uint32_t to which the speed will be written If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_gpu_fan_speed_max()

amdsmi_status_t amdsmi_get_gpu_fan_speed_max ( amdsmi_processor_handle  processor_handle,
uint32_t  sensor_ind,
uint64_t *  max_speed 
)

Get the max. fan speed of the device with provided processor handle. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and a pointer to a uint32_t max_speed, this function will write the maximum fan speed possible to the uint32_t pointed to by max_speed

Parameters
[in]processor_handlea processor handle
[in]sensor_inda 0-based sensor index. Normally, this will be 0. If a device has more than one sensor, it could be greater than 0.
[in,out]max_speeda pointer to uint32_t to which the maximum speed will be written If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_temp_metric()

amdsmi_status_t amdsmi_get_temp_metric ( amdsmi_processor_handle  processor_handle,
amdsmi_temperature_type_t  sensor_type,
amdsmi_temperature_metric_t  metric,
int64_t *  temperature 
)

Get the temperature metric value for the specified metric, from the specified temperature sensor on the specified device. It is not supported on virtual machine guest.

Platform:

gpu_bm_linux

host

Given a processor handle processor_handle, a sensor type sensor_type, a amdsmi_temperature_metric_t metric and a pointer to an int64_t temperature, this function will write the value of the metric indicated by metric and sensor_type to the memory location temperature.

Parameters
[in]processor_handlea processor handle
[in]sensor_typepart of device from which temperature should be obtained. This should come from the enum amdsmi_temperature_type_t
[in]metricenum indicated which temperature value should be retrieved
[in,out]temperaturea pointer to int64_t to which the temperature will be written, in millidegrees Celcius. If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_gpu_cache_info()

amdsmi_status_t amdsmi_get_gpu_cache_info ( amdsmi_processor_handle  processor_handle,
amdsmi_gpu_cache_info_t info 
)

Returns gpu cache info.

Platform:

gpu_bm_linux

host

Parameters
[in]processor_handlePF of a processor for which to query
[out]inforeference to the cache info struct. Must be allocated by user.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail

◆ amdsmi_get_gpu_volt_metric()

amdsmi_status_t amdsmi_get_gpu_volt_metric ( amdsmi_processor_handle  processor_handle,
amdsmi_voltage_type_t  sensor_type,
amdsmi_voltage_metric_t  metric,
int64_t *  voltage 
)

Get the voltage metric value for the specified metric, from the specified voltage sensor on the specified device. It is not supported on virtual machine guest.

Platform:
gpu_bm_linux

Given a processor handle processor_handle, a sensor type sensor_type, a amdsmi_voltage_metric_t metric and a pointer to an int64_t voltage, this function will write the value of the metric indicated by metric and sensor_type to the memory location voltage.

Parameters
[in]processor_handlea processor handle
[in]sensor_typepart of device from which voltage should be obtained. This should come from the enum amdsmi_voltage_type_t
[in]metricenum indicated which voltage value should be retrieved
[in,out]voltagea pointer to int64_t to which the voltage will be written, in millivolts. If this parameter is nullptr, this function will return AMDSMI_STATUS_INVAL if the function is supported with the provided, arguments and AMDSMI_STATUS_NOT_SUPPORTED if it is not supported with the provided arguments.
Returns
amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail