From f40d27400b0bcc218db12157d6810c0abe2325cc Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Thu, 6 Apr 2023 19:50:05 -0400 Subject: [PATCH] [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 1e81ac1bbb34..a5eddf3a9556 100644 --- a/src/runtime/metal/metal_module.mm +++ b/src/runtime/metal/metal_module.mm @@ -49,6 +49,11 @@ explicit MetalModuleNode(std::string data, std::string fmt, } 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& 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 cd4774bf0f5a..187736e82a6d 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& sptr_to_self) final; std::shared_ptr GetPipeline(size_t device_id, const std::string& func_name,