From 13398477a10c81e5c5dac3a7c773ca6272e96b57 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 22 Jun 2024 00:23:46 +0800 Subject: [PATCH] fix ubatch, autoselect vulkan dgpu if possible --- gpttype_adapter.cpp | 1 + koboldcpp.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/gpttype_adapter.cpp b/gpttype_adapter.cpp index 4d472da7f..b0bad0ff0 100644 --- a/gpttype_adapter.cpp +++ b/gpttype_adapter.cpp @@ -1053,6 +1053,7 @@ ModelLoadResult gpttype_load_model(const load_model_inputs inputs, FileFormat in #endif llama_ctx_params.n_batch = kcpp_params->n_batch; + llama_ctx_params.n_ubatch = kcpp_params->n_ubatch; llama_ctx_params.n_threads = kcpp_params->n_threads; llama_ctx_params.n_threads_batch = kcpp_params->n_threads_batch; diff --git a/koboldcpp.py b/koboldcpp.py index a77040bb8..a7d2a4661 100644 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -1767,6 +1767,7 @@ def show_new_gui(): CLDevicesNames = ["","","",""] CUDevicesNames = ["","","","",""] VKDevicesNames = ["","","",""] + VKIsDGPU = [0,0,0,0] MaxMemory = [0] tabcontent = {} @@ -2005,11 +2006,18 @@ def show_new_gui(): try: # Get Vulkan names output = subprocess.run(['vulkaninfo','--summary'], capture_output=True, text=True, check=True, encoding='utf-8').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 for dname in devicelist: if idx