vulkan env var always take priority

This commit is contained in:
Concedo
2026-01-17 10:34:45 +08:00
parent 8855a7f52b
commit d2b2224b0d
5 changed files with 10 additions and 5 deletions
+2 -1
View File
@@ -95,7 +95,8 @@ bool whispertype_load_model(const whisper_load_model_inputs inputs)
vulkan_info_str += ",";
}
}
if(vulkan_info_str!="")
const char* existingenv = getenv("GGML_VK_VISIBLE_DEVICES");
if(!existingenv && vulkan_info_str!="")
{
whispervulkandeviceenv = "GGML_VK_VISIBLE_DEVICES="+vulkan_info_str;
putenv((char*)whispervulkandeviceenv.c_str());