Skip to content

Commit

Permalink
Revert "[Bugfix][Vulkan] Call VulkanDeviceAPI destructor on program e…
Browse files Browse the repository at this point in the history
…xit (apache#7997)"

This reverts commit 58c3413.
  • Loading branch information
masahi committed May 27, 2021
1 parent 37eaf57 commit 54fb723
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/runtime/vulkan/vulkan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -418,13 +418,8 @@ class VulkanDeviceAPI final : public DeviceAPI {
}

static VulkanDeviceAPI* Global() {
// Most of the TVM Global() functions allocate with "new" and do
// not deallocate, as the OS can clean up any leftover buffers at
// the end. In this case, we need the VulkanDeviceAPI destructor
// to call vkDestroyInstance, to prevent a segfault on exit when
// using some nvidia drivers.
static VulkanDeviceAPI inst;
return &inst;
static VulkanDeviceAPI* inst = new VulkanDeviceAPI();
return inst;
}

const VulkanContext& context(size_t device_id) const {
Expand Down

0 comments on commit 54fb723

Please sign in to comment.