[SWDEV-488276/SWDEV-497613] Update memory partition set functionality
Changes:
- Added warning screen to ROCm SMI users
setting memory partition
- Added new API (rsmi_dev_memory_partition_capabilities_get)
to retrieve memory partition capabilities
(What users can set memory partition modes to)
- Increased time-bar for CLI sets display to 40 seconds
- API now waits until the driver reloads with SYSFS files active
- [SWDEV-475712] [CLI/API] Fixed target_graphics_version field
not properly displaying for MI2x or Navi 3x ASICs.
- Updated tests
Change-Id: Iaf89d1b7ad9ceb449b289bc82ea198fe3b23992e
Signed-off-by: Charis Poag <Charis.Poag@amd.com>
This commit is contained in:
@@ -4181,6 +4181,39 @@ rsmi_status_t
|
||||
rsmi_dev_memory_partition_get(uint32_t dv_ind, char *memory_partition,
|
||||
uint32_t len);
|
||||
|
||||
/**
|
||||
* @brief Retrieves the available memory partition capabilities
|
||||
* for a desired device
|
||||
*
|
||||
* @details
|
||||
* Given a device index @p dv_ind and a string @p memory_partition_caps ,
|
||||
* and uint32 @p len , this function will attempt to obtain the device's
|
||||
* available memory partition capabilities string. Upon successful
|
||||
* retreival, the obtained device's available memory partition capablilities
|
||||
* string shall be stored in the passed @p memory_partition_caps
|
||||
* char string variable.
|
||||
*
|
||||
* @param[in] dv_ind a device index
|
||||
*
|
||||
* @param[inout] memory_partition_caps a pointer to a char string variable,
|
||||
* which the device's available memory partition capabilities will be written to.
|
||||
*
|
||||
* @param[in] len the length of the caller provided buffer @p len ,
|
||||
* suggested length is 30 or greater.
|
||||
*
|
||||
* @retval ::RSMI_STATUS_SUCCESS call was successful
|
||||
* @retval ::RSMI_STATUS_INVALID_ARGS the provided arguments are not valid
|
||||
* @retval ::RSMI_STATUS_UNEXPECTED_DATA data provided to function is not valid
|
||||
* @retval ::RSMI_STATUS_NOT_SUPPORTED installed software or hardware does not
|
||||
* support this function
|
||||
* @retval ::RSMI_STATUS_INSUFFICIENT_SIZE is returned if @p len bytes is not
|
||||
* large enough to hold the entire memory partition value. In this case,
|
||||
* only @p len bytes will be written.
|
||||
*
|
||||
*/
|
||||
rsmi_status_t rsmi_dev_memory_partition_capabilities_get(
|
||||
uint32_t dv_ind, char *memory_partition_caps, uint32_t len);
|
||||
|
||||
/**
|
||||
* @brief Modifies a selected device's current memory partition setting.
|
||||
*
|
||||
|
||||
@@ -172,7 +172,8 @@ enum DevInfoTypes {
|
||||
kDevGpuReset,
|
||||
kDevAvailableComputePartition,
|
||||
kDevComputePartition,
|
||||
kDevMemoryPartition
|
||||
kDevMemoryPartition,
|
||||
kDevAvailableMemoryPartition,
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
@@ -227,6 +228,8 @@ class Device {
|
||||
bool DeviceAPISupported(std::string name, uint64_t variant,
|
||||
uint64_t sub_variant);
|
||||
rsmi_status_t restartAMDGpuDriver(void);
|
||||
rsmi_status_t isRestartInProgress(bool *isRestartInProgress,
|
||||
bool *isAMDGPUModuleLive);
|
||||
rsmi_status_t storeDevicePartitions(uint32_t dv_ind);
|
||||
template <typename T> std::string readBootPartitionState(uint32_t dv_ind);
|
||||
rsmi_status_t check_amdgpu_property_reinforcement_query(uint32_t dev_idx, AMDGpuVerbTypes_t verb_type);
|
||||
@@ -244,6 +247,7 @@ class Device {
|
||||
static const std::map<DevInfoTypes, const char*> devInfoTypesStrings;
|
||||
void set_smi_device_id(uint32_t i) { m_device_id = i; }
|
||||
void set_smi_partition_id(uint32_t i) { m_partition_id = i; }
|
||||
static const char* get_type_string(DevInfoTypes type);
|
||||
|
||||
private:
|
||||
std::shared_ptr<Monitor> monitor_;
|
||||
|
||||
@@ -91,7 +91,8 @@ std::pair<bool, std::string> executeCommand(std::string command,
|
||||
rsmi_status_t storeTmpFile(uint32_t dv_ind, std::string parameterName,
|
||||
std::string stateName, std::string storageData);
|
||||
std::vector<std::string> getListOfAppTmpFiles();
|
||||
bool containsString(std::string originalString, std::string substring);
|
||||
bool containsString(std::string originalString, std::string substring,
|
||||
bool displayComparisons = false);
|
||||
std::tuple<bool, std::string> readTmpFile(
|
||||
uint32_t dv_ind,
|
||||
std::string stateName,
|
||||
@@ -139,6 +140,8 @@ std::string removeNewLines(const std::string &s);
|
||||
|
||||
std::string removeString(const std::string origStr,
|
||||
const std::string &removeMe);
|
||||
void system_wait(int milli_seconds);
|
||||
int countDigit(uint64_t n);
|
||||
template <typename T>
|
||||
std::string print_int_as_hex(T i, bool showHexNotation = true,
|
||||
int overloadBitSize = 0) {
|
||||
|
||||
Reference in New Issue
Block a user