Skip to content

Commit

Permalink
Stronger guard against linear tiling
Browse files Browse the repository at this point in the history
Differential Revision: D66776766

Pull Request resolved: pytorch#7181
  • Loading branch information
Abhi-hpp authored Dec 5, 2024
1 parent daf9aee commit 6b41c3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backends/vulkan/runtime/vk_api/Adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ Adapter::Adapter(
VkImage image = VK_NULL_HANDLE;
VkResult res =
vkCreateImage(device_.handle, &image_create_info, nullptr, &image);
if (res == VK_ERROR_FEATURE_NOT_PRESENT) {
if (res != VK_SUCCESS) {
linear_tiling_3d_enabled_ = false;
} else if (res == VK_SUCCESS) {
} else {
vkDestroyImage(device_.handle, image, nullptr);
}
return;
Expand Down

0 comments on commit 6b41c3a

Please sign in to comment.