You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/01/08 01:40:43 UTC

[GitHub] [tvm] electriclilies opened a new pull request #9874: Add a JSON converter for 0.7 -> 0.8 and 0.8 -> 0.9

electriclilies opened a new pull request #9874:
URL: https://github.com/apache/tvm/pull/9874


   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 PTAL if you are interested! Thanks


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] electriclilies commented on a change in pull request #9874: Add a JSON converter for 0.7 -> 0.8 and 0.8 -> 0.9

Posted by GitBox <gi...@apache.org>.
electriclilies commented on a change in pull request #9874:
URL: https://github.com/apache/tvm/pull/9874#discussion_r781544944



##########
File path: python/tvm/ir/json_compact.py
##########
@@ -57,6 +57,53 @@ def _updater(data):
     return _updater
 
 
+def create_updater_08_to_09():
+    """
+    Create an update to upgrade json from v0.8 to v0.9
+
+    Returns
+    -------
+    fupdater : function
+        The updater function
+    """
+
+    def _initialize_virtual_device(item, _):
+        if "virtual_device_" not in item["attrs"].keys():

Review comment:
       Done! Thanks for the review




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen commented on a change in pull request #9874: Add a JSON converter for 0.7 -> 0.8 and 0.8 -> 0.9

Posted by GitBox <gi...@apache.org>.
tqchen commented on a change in pull request #9874:
URL: https://github.com/apache/tvm/pull/9874#discussion_r781237940



##########
File path: python/tvm/ir/json_compact.py
##########
@@ -57,6 +57,53 @@ def _updater(data):
     return _updater
 
 
+def create_updater_08_to_09():
+    """
+    Create an update to upgrade json from v0.8 to v0.9
+
+    Returns
+    -------
+    fupdater : function
+        The updater function
+    """
+
+    def _initialize_virtual_device(item, _):
+        if "virtual_device_" not in item["attrs"].keys():

Review comment:
       `"virtual_device_" not in item["attrs"]` is better so it do ont have to instantiate keys. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] masahi merged pull request #9874: Add a JSON converter for 0.7 -> 0.8 and 0.8 -> 0.9

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #9874:
URL: https://github.com/apache/tvm/pull/9874


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] electriclilies commented on pull request #9874: Add a JSON converter for 0.7 -> 0.8 and 0.8 -> 0.9

Posted by GitBox <gi...@apache.org>.
electriclilies commented on pull request #9874:
URL: https://github.com/apache/tvm/pull/9874#issuecomment-1009687401


   Thanks @masahi @tqchen!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org