Skip to content

Commit e31da58

Browse files
1435: add timeout for vulkaninfo (ggml-org#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 <[email protected]>
1 parent 27bd7b9 commit e31da58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

koboldcpp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,8 @@ def fetch_gpu_properties(testCL,testCU,testVK):
991991

992992
if testVK:
993993
try: # Get Vulkan names
994-
output = subprocess.run(['vulkaninfo','--summary'], capture_output=True, text=True, check=True, encoding='utf-8').stdout
994+
output = subprocess.run(['vulkaninfo','--summary'], capture_output=True, text=True, check=True,
995+
encoding='utf-8', timeout=5).stdout
995996
devicelist = [line.split("=")[1].strip() for line in output.splitlines() if "deviceName" in line]
996997
devicetypes = [line.split("=")[1].strip() for line in output.splitlines() if "deviceType" in line]
997998
idx = 0

0 commit comments

Comments
 (0)