File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -147,9 +147,15 @@ std::vector<ggml_vk_device> ggml_vk_available_devices(size_t memoryRequired) {
147147 if (!komputeManager ()->hasVulkan () || !komputeManager ()->hasInstance ())
148148 return results;
149149
150- std::vector<vk::PhysicalDevice> physicalDevices = komputeManager ()->listDevices ();
151- uint32_t deviceCount = physicalDevices.size ();
150+ std::vector<vk::PhysicalDevice> physicalDevices;
151+ try {
152+ physicalDevices = komputeManager ()->listDevices ();
153+ } catch (vk::SystemError & err) {
154+ std::cerr << __func__ << " : ignoring Vulkan exception: " << err.what () << " \n " ;
155+ return results;
156+ }
152157
158+ uint32_t deviceCount = physicalDevices.size ();
153159 if (deviceCount == 0 )
154160 return results;
155161
You can’t perform that action at this time.
0 commit comments