Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Runtime] Runtime module property mask for Metal and Vulkan #14524

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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