You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/10/11 09:16:49 UTC

[GitHub] [incubator-tvm] ishitatsuyuki opened a new pull request #6662: Adjust Vulkan queue selection and creation logic

ishitatsuyuki opened a new pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662


   - The queue selection logic rewrite addresses a bug in the old
   implementation where the code would pass an invalid queue index when
   selecting any queues other than number 0.
   - The queue priority has been changed to the lowest value as it doesn't
   make sense to prioritize this workload over e.g. graphics workload.
   - The new implementation will attempt to use compute-only queues which
   are common on AMD GPUs. It's not clear how much difference will this
   make but hopefully it would lead to better scheduling.
   
   The priority changes were primary made due to that the old
   implementation causing my system to hang, stutter or otherwise become
   unstable and crash. After the change I'm able to run autotvm tuning
   inside a desktop environment. While it might be good to minimize the
   variance of execution time for autotvm, it doesn't worth it when it causes
   system instability as described above.
   
   r? @tqchen 
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on a change in pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#discussion_r503332422



##########
File path: src/runtime/vulkan/vulkan.cc
##########
@@ -490,33 +491,17 @@ VulkanDeviceAPI::VulkanDeviceAPI() {
   std::vector<VkPhysicalDevice> all_phy_devs(phy_dev_count);
   VULKAN_CALL(vkEnumeratePhysicalDevices(instance_, &phy_dev_count, dmlc::BeginPtr(all_phy_devs)));
   for (VkPhysicalDevice phy_dev : all_phy_devs) {
-    uint32_t queue_prop_count = 0;
-    vkGetPhysicalDeviceQueueFamilyProperties(phy_dev, &queue_prop_count, nullptr);
-    std::vector<VkQueueFamilyProperties> queue_props(queue_prop_count);
-    vkGetPhysicalDeviceQueueFamilyProperties(phy_dev, &queue_prop_count,
-                                             dmlc::BeginPtr(queue_props));
-    uint32_t queue_family_index = 0;
-    std::vector<VkDeviceQueueCreateInfo> queue_create_info;
+    uint32_t queue_family_index = FindComputeQueue(phy_dev);
+    if (queue_family_index == -1U) continue;

Review comment:
       comparing uint to negative number is an undefined behavior, that I think we should avoid.
   
   Change the signature to
   
   ```
   // return found or not
   bool FindComputeQueue(device, uint32_t* family_index);
   ```




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on a change in pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#discussion_r503934106



##########
File path: src/runtime/vulkan/vulkan.cc
##########
@@ -490,33 +491,24 @@ VulkanDeviceAPI::VulkanDeviceAPI() {
   std::vector<VkPhysicalDevice> all_phy_devs(phy_dev_count);
   VULKAN_CALL(vkEnumeratePhysicalDevices(instance_, &phy_dev_count, dmlc::BeginPtr(all_phy_devs)));
   for (VkPhysicalDevice phy_dev : all_phy_devs) {
-    uint32_t queue_prop_count = 0;
-    vkGetPhysicalDeviceQueueFamilyProperties(phy_dev, &queue_prop_count, nullptr);
-    std::vector<VkQueueFamilyProperties> queue_props(queue_prop_count);
-    vkGetPhysicalDeviceQueueFamilyProperties(phy_dev, &queue_prop_count,
-                                             dmlc::BeginPtr(queue_props));
-    uint32_t queue_family_index = 0;
-    std::vector<VkDeviceQueueCreateInfo> queue_create_info;
+    // Get a list of queue families supporting compute, in order of preference. We currently only
+    // make use of the most preferred one family.
+    std::vector<uint32_t> queue_family_indexes = GetComputeQueueFamilies(phy_dev);
+    if (queue_family_indexes.empty()) continue;
+    uint32_t queue_family_index = queue_family_indexes[0];
     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;
-        }
-      }
+
+    std::vector<VkDeviceQueueCreateInfo> queue_create_info;
+    for (const auto& index : queue_family_indexes) {
+      struct VkDeviceQueueCreateInfo info {};

Review comment:
       In this case, I think we can use your previous logic by using the `queue_family_index[0]`. and not creating a vector. The GetComputeQueueFamilies is mainly reserved for future purposes




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-707333810


   Thanks @ishitatsuyuki , I made some followup comments


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on a change in pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#discussion_r502919415



##########
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:
       Please add a comment indicating that this is for to find the compute decidated queue

##########
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:
       Perhaps it is better to put it into a sub member function, e.g. FindComputeQueue

##########
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:
       It is still better to find all queues. perhaps putting compute only queue first




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-706712868


   Digging a bit further on the information, I could not find a lot of useful infos about the queue priority assignment, 
   
   Here is one [guideline for adreno](https://developer.qualcomm.com/qfile/34706/80-nb295-7_a-adreno_vulkan_developer_guide.pdf). Stating that 
   ```
   On Adreno, there are 3 values that are internally used (0.0,0.5,1.0). It’s important to note that these priorities are relative to all processes running on the device. In general, you should use a 1.0 priority, except with VR applications where you should choose a 0.5 value so that VR services running on the device needed for predicable display purposes can have higher priority
   ```.
   
   My reading of the statement seems to be 1.0 should be encouraged until a point where graphics is affected. I would encourage us to do a bit more experiments, and enable ```TVM_VK_QUEUE_PRIORITY``` as a part of env variable, but keep the default in 1.0 for now.
   
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on a change in pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org



[GitHub] [incubator-tvm] ishitatsuyuki commented on a change in pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
ishitatsuyuki commented on a change in pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#discussion_r502926030



##########
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 refactored the compute queue finding code out. What did you mean in the last comment? This implementation attempts to find a compute-only queue first, and if no such queue exists, it will fall back to any queue that supports compute.




----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen edited a comment on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-706712868


   Digging a bit further on the information, I could not find a lot of useful infos about the queue priority assignment, 
   
   Here is one [guideline for adreno](https://developer.qualcomm.com/qfile/34706/80-nb295-7_a-adreno_vulkan_developer_guide.pdf). Stating that 
   
   ```
   On Adreno, there are 3 values that are internally used (0.0,0.5,1.0). It’s important to note that these priorities are relative to all processes running on the device. In general, you should use a 1.0 priority, except with VR applications where you should choose a 0.5 value so that VR services running on the device needed for predicable display purposes can have higher priority
   ```
   
   My reading of the statement seems to be 1.0 should be encouraged until a point where graphics is affected. I would encourage us to do a bit more experiments, and enable ```TVM_VK_QUEUE_PRIORITY``` as a part of env variable, but keep the default in 1.0 for now.
   
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-706710628


   Thanks @ishitatsuyuki .
   
   I think it would be good to flesh out the queue priority further, since on certain desktops (e.g. Nvidia) having a high queue priority works fine. It would be great to confirm the impact of different queue priority on the performance, and whether we should set something between `0` and `1`. Ideally, we want good amount of compute without starving graphics.
   
   I would recommend do some experiment of values between `0` and `1`, we can further enable making the TVM_VK_QUEUE_PRIORITY as an env variable to adjust the value. Let us focus on other changes
   
   cc @tmoreau89 @ajtulloch 
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen merged pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662


   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-706713069


   Also https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkQueueGlobalPriorityEXT.html might be more relevant, since our main goal is to set the queue priority to be the same as the system default.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] ishitatsuyuki commented on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
ishitatsuyuki commented on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-707140380


   @tqchen I think I've addressed all comments for now, can you remove the "need update" label?


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-708008426


   Thanks @ishitatsuyuki !


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] ishitatsuyuki commented on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
ishitatsuyuki commented on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-707473359


   I have restored the previous behavior where the device was created with all queue families we could discover (I don't think this behavior is necessary nor correct though).
   
   Also I've opted for `vector<uint32_t>` return type for `GetComputeQueueFamilies`, as `VkDeviceQueueCreateInfo` contains pointers that could cause lifetime complications when used in return type.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] ishitatsuyuki commented on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
ishitatsuyuki commented on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-706717465


   After a bit of research it seems that no implementation in Mesa actually respects pQueuePriorities; therefore I have reverted that part of the change. We might want to revisit this in the future.
   
   As for VkQueueGlobalPriorityEXT, it's mostly meant for real-time use cases that requires GPU preemption, e.g. compositors, and requires process privileges for any higher-than-normal priority settings. Since most TVM workload is non-interactive, it's better to just not use it, or even if we use it, we would set the priority to LOW.


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen edited a comment on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen edited a comment on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-706712868


   Digging a bit further on the information, I could not find a lot of useful infos about the queue priority assignment, 
   
   Here is one [guideline for adreno](https://developer.qualcomm.com/qfile/34706/80-nb295-7_a-adreno_vulkan_developer_guide.pdf). Stating that 
   
   "
   On Adreno, there are 3 values that are internally used (0.0,0.5,1.0). It’s important to note that these priorities are relative to all processes running on the device. In general, you should use a 1.0 priority, except with VR applications where you should choose a 0.5 value so that VR services running on the device needed for predicable display purposes can have higher priority
   "
   
   My reading of the statement seems to be 1.0 should be encouraged until a point where graphics is affected. I would encourage us to do a bit more experiments, and enable ```TVM_VK_QUEUE_PRIORITY``` as a part of env variable, but keep the default in 1.0 for now.
   
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] ishitatsuyuki edited a comment on pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
ishitatsuyuki edited a comment on pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#issuecomment-706717465


   After a bit of research it seems that no implementation in Mesa actually respects pQueuePriorities; therefore I have reverted that part of the change. We might want to revisit this in the future.
   
   As for VkQueueGlobalPriorityEXT, it's mostly meant for real-time use cases that requires GPU preemption, e.g. compositors, and requires process privileges for any higher-than-normal priority settings. Since most TVM workload is non-interactive, it's better to just not use it, or even if we use it, we would set the priority to LOW.
   
   Also see the reply to the [code comment](https://github.com/apache/incubator-tvm/pull/6662#discussion_r502926030).


----------------------------------------------------------------
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:
users@infra.apache.org



[GitHub] [incubator-tvm] tqchen commented on a change in pull request #6662: Adjust Vulkan queue selection and creation logic

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #6662:
URL: https://github.com/apache/incubator-tvm/pull/6662#discussion_r503333227



##########
File path: src/runtime/vulkan/vulkan.cc
##########
@@ -490,33 +491,17 @@ VulkanDeviceAPI::VulkanDeviceAPI() {
   std::vector<VkPhysicalDevice> all_phy_devs(phy_dev_count);
   VULKAN_CALL(vkEnumeratePhysicalDevices(instance_, &phy_dev_count, dmlc::BeginPtr(all_phy_devs)));
   for (VkPhysicalDevice phy_dev : all_phy_devs) {
-    uint32_t queue_prop_count = 0;
-    vkGetPhysicalDeviceQueueFamilyProperties(phy_dev, &queue_prop_count, nullptr);
-    std::vector<VkQueueFamilyProperties> queue_props(queue_prop_count);
-    vkGetPhysicalDeviceQueueFamilyProperties(phy_dev, &queue_prop_count,
-                                             dmlc::BeginPtr(queue_props));
-    uint32_t queue_family_index = 0;
-    std::vector<VkDeviceQueueCreateInfo> queue_create_info;
+    uint32_t queue_family_index = FindComputeQueue(phy_dev);
+    if (queue_family_index == -1U) continue;

Review comment:
       Per other commend, maybe it is still helpful to return a vector of queue_create_info




----------------------------------------------------------------
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:
users@infra.apache.org