-
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
[Relay][VM] Relay VM serialization #3647
Conversation
Could we serialize the |
@icemelon9 yes, we could, but I am not sure if we want to do that because some instructions don't have it. The current order is consistent to the order that they are constructed but the variable-length filed is rotated to the end. |
tvm.testing.assert_allclose(res.asnumpy(), 3.0) | ||
|
||
|
||
if __name__ == "__main__": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you write a loop over all the testing models load them into vm and serialize them and ensure they produce the same result after deserialization?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be just 1 or 2? It may make the testing too slow to have all them in the unit test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you address my comments otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm.
* relay vm serialization * fix lint * load params, fix stream * lint * fix typo
* relay vm serialization * fix lint * load params, fix stream * lint * fix typo
This PR implements the serialization and deserialization of the Relay VM. For detailed information, please refer to #3594
An example could be like the following:
@jroesch @wweic @icemelon9 @tqchen @slyubomirsky @MarisaKirisame