Compute Partition Functions

Compute Partition Functions#

AMD SMI: Compute Partition Functions
Compute Partition Functions

Functions

amdsmi_status_t amdsmi_get_gpu_compute_partition (amdsmi_processor_handle processor_handle, char *compute_partition, uint32_t len)
 Retrieves the current compute partitioning for a desired device. More...
 
amdsmi_status_t amdsmi_set_gpu_compute_partition (amdsmi_processor_handle processor_handle, amdsmi_compute_partition_type_t compute_partition)
 Modifies a selected device's compute partition setting. More...
 
amdsmi_status_t amdsmi_reset_gpu_compute_partition (amdsmi_processor_handle processor_handle)
 Reverts a selected device's compute partition setting back to its boot state. More...
 

Detailed Description

These functions are used to configure and query the device's compute parition setting.

Function Documentation

◆ amdsmi_get_gpu_compute_partition()

amdsmi_status_t amdsmi_get_gpu_compute_partition ( amdsmi_processor_handle  processor_handle,
char *  compute_partition,
uint32_t  len 
)

Retrieves the current compute partitioning for a desired device.

Platform:
gpu_bm_linux

Given a processor handle processor_handle and a string compute_partition , and uint32 len , this function will attempt to obtain the device's current compute partition setting string. Upon successful retreival, the obtained device's compute partition settings string shall be stored in the passed compute_partition char string variable.

Parameters
[in]processor_handleDevice which to query
[in,out]compute_partitiona pointer to a char string variable, which the device's current compute partition will be written to.
[in]lenthe length of the caller provided buffer compute_partition , suggested length is 4 or greater.
Return values
AMDSMI_STATUS_SUCCESScall was successful
::AMDSMI_STATUS_INVALID_ARGSthe provided arguments are not valid
AMDSMI_STATUS_UNEXPECTED_DATAdata provided to function is not valid
AMDSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function
AMDSMI_STATUS_INSUFFICIENT_SIZEis returned if len bytes is not large enough to hold the entire compute partition value. In this case, only len bytes will be written.

◆ amdsmi_set_gpu_compute_partition()

amdsmi_status_t amdsmi_set_gpu_compute_partition ( amdsmi_processor_handle  processor_handle,
amdsmi_compute_partition_type_t  compute_partition 
)

Modifies a selected device's compute partition setting.

Platform:
gpu_bm_linux

Given a processor handle processor_handle, a type of compute partition compute_partition, this function will attempt to update the selected device's compute partition setting.

Parameters
[in]processor_handleDevice which to query
[in]compute_partitionusing enum amdsmi_compute_partition_type_t, define what the selected device's compute partition setting should be updated to.
Return values
AMDSMI_STATUS_SUCCESScall was successful
::AMDSMI_STATUS_PERMISSIONfunction requires root access
::AMDSMI_STATUS_INVALID_ARGSthe provided arguments are not valid
AMDSMI_STATUS_SETTING_UNAVAILABLEthe provided setting is unavailable for current device
AMDSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function

◆ amdsmi_reset_gpu_compute_partition()

amdsmi_status_t amdsmi_reset_gpu_compute_partition ( amdsmi_processor_handle  processor_handle)

Reverts a selected device's compute partition setting back to its boot state.

Platform:
gpu_bm_linux

Given a processor handle processor_handle, this function will attempt to revert its compute partition setting back to its boot state.

Parameters
[in]processor_handleDevice which to query
Return values
AMDSMI_STATUS_SUCCESScall was successful
::AMDSMI_STATUS_PERMISSIONfunction requires root access
AMDSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function