Add a JSON converter for 0.7 -> 0.8 and 0.8 -> 0.9#9874
Merged
masahi merged 9 commits intoapache:mainfrom Jan 11, 2022
Merged
Conversation
tqchen
reviewed
Jan 10, 2022
Member
tqchen
left a comment
There was a problem hiding this comment.
Thanks @electriclilies , one minor nit and it LGTM
python/tvm/ir/json_compact.py
Outdated
| """ | ||
|
|
||
| def _initialize_virtual_device(item, _): | ||
| if "virtual_device_" not in item["attrs"].keys(): |
Member
There was a problem hiding this comment.
"virtual_device_" not in item["attrs"] is better so it do ont have to instantiate keys.
Contributor
Author
There was a problem hiding this comment.
Done! Thanks for the review
tqchen
approved these changes
Jan 11, 2022
Contributor
Author
Raghav-Chakravarthy
pushed a commit
to Raghav-Chakravarthy/tvm
that referenced
this pull request
Jan 28, 2022
* Add default to serialization * revert changes in serialization.cc * update 0.6 converter * json updater working, except for cycles * clean up code * Fix tests * formatting * format : * nit
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Feb 16, 2022
* Add default to serialization * revert changes in serialization.cc * update 0.6 converter * json updater working, except for cycles * clean up code * Fix tests * formatting * format : * nit
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In this PR, I add some JSON converters. The motivation for this change is #9826-- I need to visit the virtual_device_ field in the AttrVisitor of many Relay nodes. Unfortunately, this breaks importing models serialized with TVM v 0.8. This change allows us to import those models.
I also changed the behavior of the upgrade_json function to update 0.6 to current (0.9), 0.7 to current (0.9) and 0.8 to current (0.9).
@mbs-octoml @tqchen @mbrookhart @mikepapadim PTAL if you are interested! Thanks