-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[Unity][TVMScript] Register the dispatch for runtime::Module
#14337
Conversation
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.
Generated by tvm-bot |
One generic problem: can Love to hear more opinions from the community. cc @junrushao @cyx-6 |
I don't think it's roundtrippable, and additionally, there is no guarantee that it's serializable, which means even if we print it as metadata it's not guaranteed to be parsed back |
I think this is something we need to discuss a bit further before taking actions. We should have specific categorizations of runtime modules. Let us followup in community meeting and forums. At a high level, we can categorize the runtime module properties:
Then we can find ways to be able to serialize the modules that are binary serializable and report error for the rest if we want to have strict serialization. |
I am not sure if making runtime::Module as roundtrippable as possible is a goal in this particular PR, as it primarily aims to make it "printable" not "parsable" :-) |
9d64727
to
0ad8af2
Compare
If roundtripping is not intended, we should communicate that clearly, since that would definitely be what users would expect otherwise. (Principle of least surprise.) |
I think we can close this for now, following by a more robust solution that detects binary serializable modules and only serialize those(perhaps via base64 encoding) |
Sounds good to me. Will create the new PR with this change #14406. Thank you all for the review and suggestions! |
This PR registers the dispatch for
runtime::Module
so that we can printIRModule
with BYOC runtime afterRunCodegen
pass.cc. @yelite @junrushao