Skip to content

Commit ad2a784

Browse files
committed
Optionally handle any potential error in vulkan init
1 parent 8df7593 commit ad2a784

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ggml/src/ggml-vulkan/ggml-vulkan.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12726,6 +12726,12 @@ ggml_backend_reg_t ggml_backend_vk_reg() {
1272612726
} catch (const vk::SystemError& e) {
1272712727
VK_LOG_DEBUG("ggml_backend_vk_reg() -> Error: System error: " << e.what());
1272812728
return nullptr;
12729+
} catch (const std::exception &e) {
12730+
VK_LOG_DEBUG("ggml_backend_vk_reg() -> Error: " << e.what());
12731+
return nullptr;
12732+
} catch (...) {
12733+
VK_LOG_DEBUG("ggml_backend_vk_reg() -> Error: unknown exception during Vulkan init");
12734+
return nullptr;
1272912735
}
1273012736
}
1273112737

0 commit comments

Comments
 (0)