mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2024-12-30 21:34:36 +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())
|
if (!komputeManager()->hasVulkan() || !komputeManager()->hasInstance())
|
||||||
return results;
|
return results;
|
||||||
|
|
||||||
std::vector<vk::PhysicalDevice> physicalDevices = komputeManager()->listDevices();
|
std::vector<vk::PhysicalDevice> physicalDevices;
|
||||||
uint32_t deviceCount = physicalDevices.size();
|
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)
|
if (deviceCount == 0)
|
||||||
return results;
|
return results;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user