When calling whisper_init_from_file_with_params_no_state() from multiple threads with the Vulkan backend enabled, segfaults abound. The problem seems to be that vk_instance initialization is not serialized properly. Introduce a mutex to fix the problem. It needs to be recursive because of the following call chain: ggml_vk_get_device() -> ggml_backend_vk_reg() -> ggml_vk_instance_init() |
||
|---|---|---|
| .. | ||
| cmake | ||
| include | ||
| src | ||
| .gitignore | ||
| CMakeLists.txt | ||