Handle GPU Not detected

Signed-off-by: Maisam Arif <Maisam.Arif@amd.com>
Change-Id: I988b0dddde23b83c1a8e402233b6aa08ce55d0c7
Šī revīzija ir iekļauta:
Maisam Arif
2023-11-02 20:54:03 -05:00
vecāks fc02ebc5f2
revīzija 9bfebc6f1c
2 mainīti faili ar 9 papildinājumiem un 0 dzēšanām
+5
Parādīt failu
@@ -50,6 +50,11 @@ class AMDSMICommands():
sys.exit(-1) sys.exit(-1)
else: else:
raise e raise e
if len(self.device_handles) == 0:
logging.error('Unable to detect any devices, check if driver is initialized (amdgpu not found in modules)')
sys.exit(-1)
self.stop = '' self.stop = ''
+4
Parādīt failu
@@ -154,6 +154,10 @@ class AMDSMIHelpers():
else: else:
raise e raise e
if len(device_handles) == 0:
logging.error('Unable to find any devices, check if driver is initialized (amdgpu not found in modules)')
sys.exit(-1)
# Handle spacing for the gpu_choices_str # Handle spacing for the gpu_choices_str
max_padding = int(math.log10(len(device_handles))) + 1 max_padding = int(math.log10(len(device_handles))) + 1