tqchen commented on a change in pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#discussion_r503333016
##########
File path: src/runtime/vulkan/vulkan.cc
##########
@@ -496,27 +496,30 @@ VulkanDeviceAPI::VulkanDeviceAPI() {
vkGetPhysicalDeviceQueueFamilyProperties(phy_dev, &queue_prop_count,
dmlc::BeginPtr(queue_props));
uint32_t queue_family_index = 0;
- std::vector<VkDeviceQueueCreateInfo> queue_create_info;
- float priority = 1.0f;
- for (uint32_t i = 0; i < queue_props.size(); i++) {
- // find queues that support compute
- if (VK_QUEUE_COMPUTE_BIT & queue_props[i].queueFlags) {
- VkDeviceQueueCreateInfo info;
- info.sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
- info.pNext = nullptr;
- info.flags = 0;
- info.queueFamilyIndex = i;
- info.queueCount = 1;
- info.pQueuePriorities = &priority;
-
- queue_create_info.push_back(info);
- // only use the first available queue for now
- if (queue_create_info.size() == 0) {
- queue_family_index = i;
- }
+ float priority = 0.0f;
+ auto compute_dedicated = std::find_if(queue_props.begin(),
queue_props.end(), [](auto prop) {
Review comment:
I actually meant to still return a `std::vector<>` of all queues
available, instead of a single queue
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]