Skip to content

Commit

Permalink
[Runtime] Runtime module property mask for Metal and Vulkan
Browse files Browse the repository at this point in the history
Following #14406, this PR adds the runtime module property mask for
Metal and Vulkan backend, which were left before.
  • Loading branch information
MasterJH5574 committed Apr 7, 2023
1 parent b228037 commit f40d274
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/runtime/metal/metal_module.mm
Original file line number Diff line number Diff line change
Expand Up @@ -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<Object>& sptr_to_self) final;

void SaveToFile(const std::string& file_name, const std::string& format) final {
Expand Down
5 changes: 5 additions & 0 deletions src/runtime/vulkan/vulkan_wrapped_func.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit f40d274

Please sign in to comment.