allow selecting multigpu on vulkan

This commit is contained in:
Concedo 2024-06-06 18:36:56 +08:00
parent 3e4c44bace
commit 813cf829b5
5 changed files with 53 additions and 24 deletions

View file

@ -159,12 +159,11 @@ bool whispertype_load_model(const whisper_load_model_inputs inputs)
vulkan_info_str += ",";
}
}
if(vulkan_info_str=="")
if(vulkan_info_str!="")
{
vulkan_info_str = "0";
whispervulkandeviceenv = "GGML_VK_VISIBLE_DEVICES="+vulkan_info_str;
putenv((char*)whispervulkandeviceenv.c_str());
}
whispervulkandeviceenv = "GGML_VK_VISIBLE_DEVICES="+vulkan_info_str;
putenv((char*)whispervulkandeviceenv.c_str());
std::string modelfile = inputs.model_filename;