mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-28 12:24:35 +00:00
kompute : ignore exceptions in ggml_vk_available_devices (#12)
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
parent
de9b0bbbe4
commit
02b9bafe29
@ -147,9 +147,15 @@ std::vector<ggml_vk_device> ggml_vk_available_devices(size_t memoryRequired) {
|
||||
if (!komputeManager()->hasVulkan() || !komputeManager()->hasInstance())
|
||||
return results;
|
||||
|
||||
std::vector<vk::PhysicalDevice> physicalDevices = komputeManager()->listDevices();
|
||||
uint32_t deviceCount = physicalDevices.size();
|
||||
std::vector<vk::PhysicalDevice> physicalDevices;
|
||||
try {
|
||||
physicalDevices = komputeManager()->listDevices();
|
||||
} catch (vk::SystemError & err) {
|
||||
std::cerr << __func__ << ": ignoring Vulkan exception: " << err.what() << "\n";
|
||||
return results;
|
||||
}
|
||||
|
||||
uint32_t deviceCount = physicalDevices.size();
|
||||
if (deviceCount == 0)
|
||||
return results;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user