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. | |
| 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. | |
| amdsmi_status_t | amdsmi_get_gpu_memory_partition_config (amdsmi_processor_handle processor_handle, amdsmi_memory_partition_config_t *config) |
| Returns current gpu memory partition capabilities. | |
| amdsmi_status_t | amdsmi_set_gpu_memory_partition_mode (amdsmi_processor_handle processor_handle, amdsmi_memory_partition_type_t mode) |
| Sets memory partition mode Set accelerator partition setting based on profile_index from amdsmi_get_gpu_accelerator_partition_profile_config. | |
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 lenbytes is not large enough to hold the entire memory partition value. In this case, onlylenbytes will be written.
- Returns
- amdsmi_status_t
◆ 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. This function does not allow any concurrent operations. Device must be idle and have no workloads when performing set partition operations.
On
- Platform:
- gpu_bm_linux AMDGPU driver restart is REQUIRED to complete updating to the new memory partition setting. Refer to
amdsmi_gpu_driver_reload()for more details.
- 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
- Returns
- amdsmi_status_t
◆ amdsmi_get_gpu_memory_partition_config()
| amdsmi_status_t amdsmi_get_gpu_memory_partition_config | ( | amdsmi_processor_handle | processor_handle, |
| amdsmi_memory_partition_config_t * | config | ||
| ) |
Returns current gpu memory partition capabilities.
- Platform:
gpu_bm_linux
host
guest_1vf
guest_mvf
- Parameters
-
[in] processor_handle a processor handle [out] config reference to the memory partition config. Must be allocated by user.
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail
◆ amdsmi_set_gpu_memory_partition_mode()
| amdsmi_status_t amdsmi_set_gpu_memory_partition_mode | ( | amdsmi_processor_handle | processor_handle, |
| amdsmi_memory_partition_type_t | mode | ||
| ) |
Sets memory partition mode Set accelerator partition setting based on profile_index from amdsmi_get_gpu_accelerator_partition_profile_config.
- Platform:
gpu_bm_linux
host
Given a processor handle processor_handle and a type of memory partition mode, this function will attempt to update the selected device's memory partition setting. This function does not allow any concurrent operations. Device must be idle and have no workloads when performing set partition operations.
On
- Platform:
- gpu_bm_linux AMDGPU driver restart is REQUIRED to complete updating to the new memory partition setting. Refer to
amdsmi_gpu_driver_reload()for more details.
- Parameters
-
[in] processor_handle A processor handle [in] mode Enum representing memory partitioning mode to set
- Returns
- amdsmi_status_t | AMDSMI_STATUS_SUCCESS on success, non-zero on fail