diff --git a/koboldcpp.py b/koboldcpp.py index 1733bda33..9bbfc1f76 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -972,6 +972,8 @@ def autoset_gpu_layers(ctxsize,sdquanted,bbs): #shitty algo to determine how man def fetch_gpu_properties(testCL,testCU,testVK): import subprocess + gpumem_ignore_limit = 1024*1024*600 + if testCU: FetchedCUdevices = [] FetchedCUdeviceMem = [] @@ -1038,6 +1040,7 @@ def fetch_gpu_properties(testCL,testCU,testVK): if testVK: try: # Get Vulkan names + foundVkGPU = False output = subprocess.run(['vulkaninfo','--summary'], capture_output=True, text=True, check=True, encoding='utf-8', timeout=10).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] @@ -1050,8 +1053,31 @@ def fetch_gpu_properties(testCL,testCU,testVK): idx = 0 for dvtype in devicetypes: if idx gpumem_ignore_limit: + lowestvkmem = dmem if lowestvkmem==0 else (dmem if dmem gpumem_ignore_limit: + lowestclmem = dmem if lowestclmem==0 else (dmem if dmem