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) {
147
147
if (!komputeManager ()->hasVulkan () || !komputeManager ()->hasInstance ())
148
148
return results;
149
149
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
+ }
152
157
158
+ uint32_t deviceCount = physicalDevices.size ();
153
159
if (deviceCount == 0 )
154
160
return results;
155
161
You can’t perform that action at this time.
0 commit comments