This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new b98d036660 [Runtime] Runtime module property mask for Metal and Vulkan
b98d036660 is described below

commit b98d036660c46940dad3be4db63c3760dedf9d79
Author: Ruihang Lai <[email protected]>
AuthorDate: Thu Apr 6 19:50:05 2023 -0400

    [Runtime] Runtime module property mask for Metal and Vulkan
    
    Following #14406, this PR adds the runtime module property mask for
    Metal and Vulkan backend, which were left before.
---
 src/runtime/metal/metal_module.mm        | 5 +++++
 src/runtime/vulkan/vulkan_wrapped_func.h | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/src/runtime/metal/metal_module.mm 
b/src/runtime/metal/metal_module.mm
index 1e81ac1bbb..a5eddf3a95 100644
--- a/src/runtime/metal/metal_module.mm
+++ b/src/runtime/metal/metal_module.mm
@@ -49,6 +49,11 @@ class MetalModuleNode final : public runtime::ModuleNode {
   }
   const char* type_key() const final { return "metal"; }
 
+  /*! \brief Get the property of the runtime module. */
+  int GetPropertyMask() const final {
+    return ModulePropertyMask::kBinarySerializable | 
ModulePropertyMask::kRunnable;
+  }
+
   PackedFunc GetFunction(const std::string& name, const ObjectPtr<Object>& 
sptr_to_self) final;
 
   void SaveToFile(const std::string& file_name, const std::string& format) 
final {
diff --git a/src/runtime/vulkan/vulkan_wrapped_func.h 
b/src/runtime/vulkan/vulkan_wrapped_func.h
index cd4774bf0f..187736e82a 100644
--- a/src/runtime/vulkan/vulkan_wrapped_func.h
+++ b/src/runtime/vulkan/vulkan_wrapped_func.h
@@ -89,6 +89,11 @@ class VulkanModuleNode final : public runtime::ModuleNode {
 
   const char* type_key() const final { return "vulkan"; }
 
+  /*! \brief Get the property of the runtime module. */
+  int GetPropertyMask() const final {
+    return ModulePropertyMask::kBinarySerializable | 
ModulePropertyMask::kRunnable;
+  }
+
   PackedFunc GetFunction(const std::string& name, const ObjectPtr<Object>& 
sptr_to_self) final;
 
   std::shared_ptr<VulkanPipeline> GetPipeline(size_t device_id, const 
std::string& func_name,

Reply via email to