summaryrefslogtreecommitdiff
path: root/ggml-vulkan.cpp
diff options
context:
space:
mode:
authorGainLee <perfecter.gen@gmail.com>2024-03-18 01:12:22 +0800
committerGitHub <noreply@github.com>2024-03-17 18:12:22 +0100
commitdc0f6125487dcfbff913360f9d877bc0ccf6aa57 (patch)
treecd92ffb5b49d9b4030990bd830533cc54d52186a /ggml-vulkan.cpp
parentc47cf414efafb8f60596edc7edb5a2d68065e992 (diff)
ggml:fix finding transfer queue family index error (#6094)
Co-authored-by: GainLee <ligen@meizu.com>
Diffstat (limited to 'ggml-vulkan.cpp')
-rw-r--r--ggml-vulkan.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/ggml-vulkan.cpp b/ggml-vulkan.cpp
index 7cce616b..698b3149 100644
--- a/ggml-vulkan.cpp
+++ b/ggml-vulkan.cpp
@@ -710,6 +710,12 @@ static uint32_t ggml_vk_find_queue_family_index(std::vector<vk::QueueFamilyPrope
}
}
+ // 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.
+ // 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.
+ if (compute_index >= 0) {
+ return compute_index;
+ }
+
std::cerr << "ggml_vulkan: No suitable queue family index found." << std::endl;
for(auto &q_family : queue_family_props) {