[SWDEV-450553] Added gpu memory overdrive to metric function

Signed-off-by: gabrpham <Gabriel.Pham@amd.com>
Change-Id: If7bd6865d641a5a83c594a4d3c57938b1b6dc18e


[ROCm/amdsmi commit: 7d8e54d0e1]
This commit is contained in:
gabrpham
2024-08-29 10:21:06 -05:00
committed by Maisam Arif
parent 53964b5b4a
commit 614c89889c
10 changed files with 133 additions and 12 deletions
@@ -1610,7 +1610,7 @@ except AmdSmiException as e:
### amdsmi_set_gpu_od_clk_info
Description: This function sets the clock frequency information
Description: This function sets the clock frequency information.
It is not supported on virtual machine guest
Input parameters:
@@ -2156,6 +2156,38 @@ except AmdSmiException as e:
print(e)
```
### amdsmi_get_gpu_mem_overdrive_level
Description: Get the GPU memory clock overdrive percent associated with the device with provided
device handle. It is not supported on virtual machine guest
Input parameters:
* `processor_handle` handle for the given device
Output: Overdrive percentage as integer
Exceptions that can be thrown by `amdsmi_get_gpu_mem_overdrive_level` function:
* `AmdSmiLibraryException`
* `AmdSmiRetryException`
* `AmdSmiParameterException`
Example:
```python
try:
devices = amdsmi_get_processor_handles()
if len(devices) == 0:
print("No GPUs on machine")
else:
for device in devices:
od_level = amdsmi_get_gpu_mem_overdrive_level(dev)
print(od_level)
except AmdSmiException as e:
print(e)
```
### amdsmi_get_clk_freq
Description: Get the list of possible system clock speeds of device for a