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... | |
amdsmi_status_t | amdsmi_reset_gpu_memory_partition (amdsmi_processor_handle processor_handle) |
Reverts a selected device's memory partition setting back to its boot state. 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_handle Device which to query [in,out] memory_partition a pointer to a char string variable, which the device's memory partition will be written to. [in] len the length of the caller provided buffer memory_partition
, suggested length is 5 or greater.
- Return values
-
AMDSMI_STATUS_SUCCESS call was successful AMDSMI_STATUS_INVAL the provided arguments are not valid AMDSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function AMDSMI_STATUS_INSUFFICIENT_SIZE is returned if len
bytes is not large enough to hold the entire memory partition value. In this case, onlylen
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_handle Device which to query [in] memory_partition using enum amdsmi_memory_partition_type_t, define what the selected device's current mode setting should be updated to.
- Return values
-
AMDSMI_STATUS_SUCCESS call was successful ::AMDSMI_STATUS_PERMISSION function requires root access AMDSMI_STATUS_INVAL the provided arguments are not valid AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function AMDSMI_STATUS_AMDGPU_RESTART_ERR could not successfully restart the amdgpu driver
◆ amdsmi_reset_gpu_memory_partition()
amdsmi_status_t amdsmi_reset_gpu_memory_partition | ( | amdsmi_processor_handle | processor_handle | ) |
Reverts a selected device's memory partition setting back to its boot state.
- Platform:
- gpu_bm_linux
Given a processor handle processor_handle
, this function will attempt to revert its current memory partition setting back to its boot state.
- Parameters
-
[in] processor_handle Device which to query
- Return values
-
AMDSMI_STATUS_SUCCESS call was successful ::AMDSMI_STATUS_PERMISSION function requires root access AMDSMI_STATUS_NOT_SUPPORTED installed software or hardware does not support this function AMDSMI_STATUS_AMDGPU_RESTART_ERR could not successfully restart the amdgpu driver