Skip to content

Commit dc0f612

Browse files
GainLeeMeizuToB
andauthored
ggml:fix finding transfer queue family index error (#6094)
Co-authored-by: GainLee <[email protected]>
1 parent c47cf41 commit dc0f612

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ggml-vulkan.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,12 @@ static uint32_t ggml_vk_find_queue_family_index(std::vector<vk::QueueFamilyPrope
710710
}
711711
}
712712

713+
// All commands that are allowed on a queue that supports transfer operations are also allowed on a queue that supports either graphics or compute operations.
714+
// Thus, if the capabilities of a queue family include VK_QUEUE_GRAPHICS_BIT or VK_QUEUE_COMPUTE_BIT, then reporting the VK_QUEUE_TRANSFER_BIT capability separately for that queue family is optional.
715+
if (compute_index >= 0) {
716+
return compute_index;
717+
}
718+
713719
std::cerr << "ggml_vulkan: No suitable queue family index found." << std::endl;
714720

715721
for(auto &q_family : queue_family_props) {

0 commit comments

Comments
 (0)