Memory Partition Functions

Memory Partition Functions#

AMD SMI: Memory Partition Functions
Memory Partition Functions

Functions

amdsmi_status_t amdsmi_get_gpu_memory_partition (amdsmi_processor_handle processor_handle, char *memory_partition, uint32_t len)
 Retrieves the current memory partition for a desired device. More...
 
amdsmi_status_t amdsmi_set_gpu_memory_partition (amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t memory_partition)
 Modifies a selected device's current memory partition setting. More...
 

Detailed Description

These functions are used to query and set the device's current memory partition.

Function Documentation

◆ amdsmi_get_gpu_memory_partition()

amdsmi_status_t amdsmi_get_gpu_memory_partition ( amdsmi_processor_handle  processor_handle,
char *  memory_partition,
uint32_t  len 
)

Retrieves the current memory partition for a desired device.

Platform:
gpu_bm_linux

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

Parameters
[in]processor_handleDevice which to query
[in,out]memory_partitiona pointer to a char string variable, which the device's memory partition will be written to.
[in]lenthe length of the caller provided buffer memory_partition , suggested length is 5 or greater.
Return values
AMDSMI_STATUS_SUCCESScall was successful
AMDSMI_STATUS_INVALthe 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 memory partition value. In this case, only len bytes will be written.

◆ amdsmi_set_gpu_memory_partition()

amdsmi_status_t amdsmi_set_gpu_memory_partition ( amdsmi_processor_handle  processor_handle,
amdsmi_memory_partition_type_t  memory_partition 
)

Modifies a selected device's current memory partition setting.

Platform:
gpu_bm_linux

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

Parameters
[in]processor_handleDevice which to query
[in]memory_partitionusing enum amdsmi_memory_partition_type_t, define what the selected device's current mode setting should be updated to.
Return values
AMDSMI_STATUS_SUCCESScall was successful
::AMDSMI_STATUS_PERMISSIONfunction requires root access
AMDSMI_STATUS_INVALthe provided arguments are not valid
AMDSMI_STATUS_NOT_SUPPORTEDinstalled software or hardware does not support this function
AMDSMI_STATUS_AMDGPU_RESTART_ERRcould not successfully restart the amdgpu driver