Skip to content

Commit b98d036

Browse files
MasterJH5574tqchen
authored andcommitted
[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.
1 parent 460374f commit b98d036

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/runtime/metal/metal_module.mm

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ explicit MetalModuleNode(std::string data, std::string fmt,
4949
}
5050
const char* type_key() const final { return "metal"; }
5151

52+
/*! \brief Get the property of the runtime module. */
53+
int GetPropertyMask() const final {
54+
return ModulePropertyMask::kBinarySerializable | ModulePropertyMask::kRunnable;
55+
}
56+
5257
PackedFunc GetFunction(const std::string& name, const ObjectPtr<Object>& sptr_to_self) final;
5358

5459
void SaveToFile(const std::string& file_name, const std::string& format) final {

src/runtime/vulkan/vulkan_wrapped_func.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ class VulkanModuleNode final : public runtime::ModuleNode {
8989

9090
const char* type_key() const final { return "vulkan"; }
9191

92+
/*! \brief Get the property of the runtime module. */
93+
int GetPropertyMask() const final {
94+
return ModulePropertyMask::kBinarySerializable | ModulePropertyMask::kRunnable;
95+
}
96+
9297
PackedFunc GetFunction(const std::string& name, const ObjectPtr<Object>& sptr_to_self) final;
9398

9499
std::shared_ptr<VulkanPipeline> GetPipeline(size_t device_id, const std::string& func_name,

0 commit comments

Comments
 (0)