Skip to content

Commit

Permalink
Handle more errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Upliner committed Jun 29, 2023
1 parent 42eb382 commit 4cab7c2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2287,7 +2287,11 @@ VulkanDevice::VulkanDevice(int device_index)
}
}

d->create_dummy_buffer_image();
int cret = d->create_dummy_buffer_image();
if (cret != 0)
{
NCNN_LOGE("VulkanDevice create_dummy_buffer_image failed %d", cret);
}

d->pipeline_cache = new PipelineCache(this);

Expand Down
4 changes: 2 additions & 2 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1832,9 +1832,9 @@ int Net::load_model(const DataReader& dr)
}

#if NCNN_VULKAN
if (opt.use_vulkan_compute)
if (ret == 0 && opt.use_vulkan_compute)
{
d->upload_model();
ret = d->upload_model();
}
#endif // NCNN_VULKAN

Expand Down

0 comments on commit 4cab7c2

Please sign in to comment.