Skip to content

Commit

Permalink
[Cherry-Pick][Runtime] Runtime module property mask for Metal and Vul…
Browse files Browse the repository at this point in the history
…kan (apache/tvm#14524) (#180)

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 10, 2023
1 parent ef8502d commit 8c6f1b5
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 8c6f1b5

Please sign in to comment.