Don't crash on available devices if we can't even create an instance.
This commit is contained in:
parent
703ef9c125
commit
0631ea363c
2 changed files with 9 additions and 2 deletions
|
@ -131,7 +131,7 @@ static std::string ggml_vk_getVendorName(uint32_t vendorID) {
|
|||
|
||||
std::vector<ggml_vk_device> ggml_vk_available_devices(size_t memoryRequired) {
|
||||
std::vector<ggml_vk_device> results;
|
||||
if (!komputeManager()->hasVulkan())
|
||||
if (!komputeManager()->hasVulkan() || !komputeManager()->hasInstance())
|
||||
return results;
|
||||
|
||||
std::vector<vk::PhysicalDevice> physicalDevices = komputeManager()->listDevices();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue