Skip to content

Commit

Permalink
Add Vulkan device validation to Net::load_param_bin
Browse files Browse the repository at this point in the history
  • Loading branch information
Upliner committed Oct 17, 2024
1 parent c15d345 commit a326f08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ int Net::load_param_bin(const DataReader& dr)
if (opt.use_vulkan_compute)
{
if (!d->vkdev) d->vkdev = get_gpu_device();
if (!d->vkdev) opt.use_vulkan_compute = false; // no vulkan device, fallback to cpu
if (!d->vkdev || !d->vkdev->is_valid()) opt.use_vulkan_compute = false; // no valid vulkan device, fallback to cpu
}
if (opt.use_vulkan_compute)
{
Expand Down

0 comments on commit a326f08

Please sign in to comment.