Skip to content

Commit f1d8909

Browse files
committed
Catch all exceptions for nvidia-smi and rocm-smi
1 parent db14154 commit f1d8909

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

exllamav2/util.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,19 +291,19 @@ def get_all_gpu_memory():
291291
try:
292292
nvidia_memory = get_nvidia_gpu_memory(visible_devices)
293293
gpu_memory.update(nvidia_memory)
294-
except FileNotFoundError:
294+
except:
295295
pass
296296
# print("nvidia-smi not found. Skipping NVIDIA GPU check.")
297297

298298
try:
299299
amd_memory = get_amd_gpu_memory()
300300
gpu_memory.update(amd_memory)
301-
except FileNotFoundError:
301+
except:
302302
pass
303-
# print("rocm-smi not found. Skipping AMD GPU check.") # TODO: remove warning on NVidia, test on AMD
303+
# print("rocm-smi not found. Skipping AMD GPU check.") # TODO: test on AMD
304304

305305
assert gpu_memory, \
306-
"Unable to read available VRAM from nvidia-smi or rocm-smi"
306+
"Unable to read available VRAM from either nvidia-smi or rocm-smi"
307307

308308
return gpu_memory
309309

0 commit comments

Comments
 (0)