Skip to content

Commit 835dc17

Browse files
committed
Update base for Update on "[11/n][ET-VK] Introduce vTensor creation from external image"
Nearly all metadata is initialized to null/dummy values, except those absolutely needed in the pipeline: (1) image extents, (2) logical limits. Differential Revision: [D63843819](https://our.internmc.facebook.com/intern/diff/D63843819/) [ghstack-poisoned]
1 parent 6c68005 commit 835dc17

File tree

2 files changed

+6
-191
lines changed

2 files changed

+6
-191
lines changed

backends/vulkan/runtime/utils/AhbUtils.h

Lines changed: 0 additions & 185 deletions
This file was deleted.

backends/vulkan/runtime/vk_api/Descriptor.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ DescriptorSet& DescriptorSet::bind(
116116
DescriptorSet& DescriptorSet::bind(
117117
const uint32_t idx,
118118
const VulkanImage& image) {
119-
// Check is only accurate for images allocated with VMA
120-
if (image.vma_allocator() != VK_NULL_HANDLE) {
121-
VK_CHECK_COND(
122-
image.has_memory(),
123-
"Image must be bound to memory for it to be usable");
124-
}
119+
// If the image does not have an allocator attached, then it is externally
120+
// allocated; assume it is already bound to memory. Otherwise, it must be
121+
// bound to a VmaAllocation to be used.
122+
VK_CHECK_COND(
123+
image.vma_allocator() == VK_NULL_HANDLE || image.has_memory(),
124+
"Image must be bound to memory for it to be usable");
125125

126126
VkImageLayout binding_layout = image.layout();
127127
if (shader_layout_signature_[idx] == VK_DESCRIPTOR_TYPE_STORAGE_IMAGE) {

0 commit comments

Comments
 (0)