Updated imports on amdsmi_quick_start

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: Ideb0f2addf61fb6bdb728e549a8b0f133682d7d6


[ROCm/amdsmi commit: 0da6613b99]
This commit is contained in:
Maisam Arif
2025-04-04 11:46:10 -05:00
committed by Arif, Maisam
parent 2c88f8ebe6
commit dab3e0657b
+16 -6
View File
@@ -26,18 +26,28 @@ import logging
import signal
import sys
from amdsmi import *
try:
from amdsmi import *
except ImportError as e:
print(f"Failed to import 'amdsmi': {e}")
print("Ensure that the 'amdsmi' library is installed and accessible.")
raise
from pathlib import Path
sys.path.append(str(Path('/opt/rocm/libexec/')))
sys.path.append(str(Path('/opt/rocm/libexec/amdsmi_cli/')))
from amdsmi_commands import AMDSMICommands
from amdsmi_helpers import AMDSMIHelpers
from amdsmi_logger import AMDSMILogger
from amdsmi_parser import AMDSMIParser
import amdsmi_cli_exceptions
try:
from amdsmi_commands import AMDSMICommands
from amdsmi_helpers import AMDSMIHelpers
from amdsmi_logger import AMDSMILogger
from amdsmi_parser import AMDSMIParser
import amdsmi_cli_exceptions
except ImportError as e:
print(f"Failed to import amdsmi cli libs: {e}")
print("Ensure that you have installed amdsmi's package.")
helpers = AMDSMIHelpers()