From e31da5861a28086190cacfabf0e6079005360135 Mon Sep 17 00:00:00 2001 From: InconsolableCellist <23345188+InconsolableCellist@users.noreply.github.com> Date: Fri, 21 Mar 2025 21:01:22 -0600 Subject: [PATCH] 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 --- koboldcpp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/koboldcpp.py b/koboldcpp.py index f6e0ba25f..fed356331 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -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