We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 708fd9a commit dbd0114Copy full SHA for dbd0114
src/runtime/vulkan/vulkan.cc
@@ -189,6 +189,10 @@ class VulkanDeviceAPI final : public DeviceAPI {
189
}
190
191
void FreeDataSpace(TVMContext ctx, void* ptr) final {
192
+ // Before releasing the vkBuffer, call sync to
193
+ // finish all the vulkan commands that reference the buffer.
194
+ StreamSync(ctx, nullptr);
195
+
196
const auto& vctx = context(ctx.device_id);
197
auto* pbuf = static_cast<VulkanBuffer*>(ptr);
198
vkDestroyBuffer(vctx.device, pbuf->buffer, nullptr);
0 commit comments