1435: add timeout for vulkaninfo (#1436)

* Fix the Colab PR

* 1435: add timeout for vulkaninfo

There's a bug in vulkaninfo where it can hang, and this will prevent
koboldcpp from starting. This adds a 5 second timeout

* restoring colab.ipynb

* Formatting

---------

Co-authored-by: henk717 <henk@henk.tech>
This commit is contained in:
InconsolableCellist 2025-03-21 21:01:22 -06:00 committed by GitHub
parent 27bd7b95f5
commit e31da5861a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -991,7 +991,8 @@ def fetch_gpu_properties(testCL,testCU,testVK):
if testVK:
try: # Get Vulkan names
output = subprocess.run(['vulkaninfo','--summary'], capture_output=True, text=True, check=True, encoding='utf-8').stdout
output = subprocess.run(['vulkaninfo','--summary'], capture_output=True, text=True, check=True,
encoding='utf-8', timeout=5).stdout
devicelist = [line.split("=")[1].strip() for line in output.splitlines() if "deviceName" in line]
devicetypes = [line.split("=")[1].strip() for line in output.splitlines() if "deviceType" in line]
idx = 0