Compute Partition Functions

Compute Partition Functions#

ROCmSMI: Compute Partition Functions
Compute Partition Functions

Functions

rsmi_status_t rsmi_dev_compute_partition_get (uint32_t dv_ind, char *compute_partition, uint32_t len)
 Retrieves the current compute partitioning for a desired device. More...
 
rsmi_status_t rsmi_dev_compute_partition_set (uint32_t dv_ind, rsmi_compute_partition_type_t compute_partition)
 Modifies a selected device's compute partition setting. More...
 
rsmi_status_t rsmi_dev_compute_partition_reset (uint32_t dv_ind)
 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

◆ rsmi_dev_compute_partition_get()

rsmi_status_t rsmi_dev_compute_partition_get ( uint32_t  dv_ind,
char *  compute_partition,
uint32_t  len 
)

Retrieves the current compute partitioning for a desired device.

Given a device index dv_ind 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]dv_inda device index
[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
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid
RSMI_STATUS_UNEXPECTED_DATAdata provided to function is not valid
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function
RSMI_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.

◆ rsmi_dev_compute_partition_set()

rsmi_status_t rsmi_dev_compute_partition_set ( uint32_t  dv_ind,
rsmi_compute_partition_type_t  compute_partition 
)

Modifies a selected device's compute partition setting.

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

Parameters
[in]dv_inda device index
[in]compute_partitionusing enum rsmi_compute_partition_type_t, define what the selected device's compute partition setting should be updated to.
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_PERMISSIONfunction requires root access
RSMI_STATUS_INVALID_ARGSthe provided arguments are not valid
RSMI_STATUS_SETTING_UNAVAILABLEthe provided setting is unavailable for current device
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function
RSMI_STATUS_BUSYA resource or mutex could not be acquired because it is already being used - device is busy

◆ rsmi_dev_compute_partition_reset()

rsmi_status_t rsmi_dev_compute_partition_reset ( uint32_t  dv_ind)

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

Given a device index dv_ind , this function will attempt to revert its compute partition setting back to its boot state.

Parameters
[in]dv_inda device index
Return values
RSMI_STATUS_SUCCESScall was successful
RSMI_STATUS_PERMISSIONfunction requires root access
RSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function
RSMI_STATUS_BUSYA resource or mutex could not be acquired because it is already being used - device is busy