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 2021/04/16 23:15:54 UTC

[GitHub] [tvm] masahi commented on a change in pull request #7867: [Runtime] Driver version + consistent clock speed units

masahi commented on a change in pull request #7867:
URL: https://github.com/apache/tvm/pull/7867#discussion_r615163384



##########
File path: src/runtime/vulkan/vulkan.cc
##########
@@ -487,15 +488,29 @@ void VulkanDeviceAPI::GetAttr(Device dev, DeviceAttrKind kind, TVMRetValue* rv)
       break;
     }
     case kMaxRegistersPerBlock:
-      return;
+      break;
     case kGcnArch:
-      return;
+      break;
     case kApiVersion:
-      return;
+      *rv = VK_HEADER_VERSION;
+      break;
+    case kDriverVersion: {
+      int64_t value = phy_prop.driverVersion;
+      std::ostringstream os;
+      os << VK_VERSION_MAJOR(value) << "." << VK_VERSION_MINOR(value) << "."
+         << VK_VERSION_PATCH(value);
+      *rv = os.str();
+      break;
+    }
   }
 }
 
 VulkanDeviceAPI::VulkanDeviceAPI() {
+  uint32_t version;
+  vkEnumerateInstanceVersion(&version);
+  std::cout << "Vulkan instance version " << VK_VERSION_MAJOR(version) << "."

Review comment:
       LOG(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