Refactor ESMI Initialization and Argument Parsing

Signed-off-by: Maisam Arif <maisarif@amd.com>
Change-Id: Iefab3a8110e0d3c525ee0cef1bdef9101550e9de
This commit is contained in:
Maisam Arif authored and Maisam Arif committed 2024-02-21 19:02:14 -05:00
1 parent 180f893791
commit f58613561c
10 files changed
+1615 -1295

No files matched your search

+7 -2
View File
@@ -73,7 +73,7 @@ except AmdSmiException as e:
### amdsmi_init
Description: Initialize amdsmi lib and connect to driver
Description: Dynamically initialize amdsmi with amd_hsmp and amdgpu drivers
Input parameters: `None`
@@ -87,7 +87,12 @@ Example:
```python
try:
amdsmi_init()
init_flag = amdsmi_init()
# Print out integer bitmask of initialized drivers
# 1 is for amd_hsmp
# 2 is for amdgpu
# 3 is for amd_hsmp and amdgpu
print(init_flag)
# continue with amdsmi
except AmdSmiException as e:
print("Init failed")