diff --git a/src/runtime/vulkan/vulkan.cc b/src/runtime/vulkan/vulkan.cc index 8982ea32648b..3c8b184e87c8 100644 --- a/src/runtime/vulkan/vulkan.cc +++ b/src/runtime/vulkan/vulkan.cc @@ -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 {