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 2020/03/05 13:18:22 UTC

[GitHub] [incubator-tvm] jjohnson-arm opened a new pull request #4992: [Frontend][Torch] Check graph inputs match expected

jjohnson-arm opened a new pull request #4992: [Frontend][Torch] Check graph inputs match expected
URL: https://github.com/apache/incubator-tvm/pull/4992
 
 
   * error/warn when missing/unused graph inputs

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] masahi commented on issue #4992: [Frontend][Torch] Check graph inputs match expected

Posted by GitBox <gi...@apache.org>.
masahi commented on issue #4992: [Frontend][Torch] Check graph inputs match expected
URL: https://github.com/apache/incubator-tvm/pull/4992#issuecomment-596021592
 
 
   thanks @jjohnson-arm 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] masahi commented on issue #4992: [Frontend][Torch] Check graph inputs match expected

Posted by GitBox <gi...@apache.org>.
masahi commented on issue #4992: [Frontend][Torch] Check graph inputs match expected
URL: https://github.com/apache/incubator-tvm/pull/4992#issuecomment-595431009
 
 
   Let's wait until the github bug is fixed

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] masahi commented on a change in pull request #4992: [Frontend][Torch] Check graph inputs match expected

Posted by GitBox <gi...@apache.org>.
masahi commented on a change in pull request #4992: [Frontend][Torch] Check graph inputs match expected
URL: https://github.com/apache/incubator-tvm/pull/4992#discussion_r388297235
 
 

 ##########
 File path: python/tvm/relay/frontend/pytorch.py
 ##########
 @@ -902,6 +902,21 @@ def _report_missing_conversion(op_names):
         msg = "The following operators are not implemented: {}".format(missing)
         raise NotImplementedError(msg)
 
+def _check_input_names(graph, input_shapes):
+    """ Check the graph inputs match the inputs """
+    # remove self at the 0th arg
+    ir_inputs = _get_input_names(graph)[1:]
 
 Review comment:
   Passing script_module and using _get_graph_input_names would be simpler? 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] jjohnson-arm commented on issue #4992: [Frontend][Torch] Check graph inputs match expected

Posted by GitBox <gi...@apache.org>.
jjohnson-arm commented on issue #4992: [Frontend][Torch] Check graph inputs match expected
URL: https://github.com/apache/incubator-tvm/pull/4992#issuecomment-595224938
 
 
   Fix for: https://discuss.tvm.ai/t/pytorch-wrongly-defined-graph-input-names-cause-keyerror/5866

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] masahi merged pull request #4992: [Frontend][Torch] Check graph inputs match expected

Posted by GitBox <gi...@apache.org>.
masahi merged pull request #4992: [Frontend][Torch] Check graph inputs match expected
URL: https://github.com/apache/incubator-tvm/pull/4992
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-tvm] jjohnson-arm commented on a change in pull request #4992: [Frontend][Torch] Check graph inputs match expected

Posted by GitBox <gi...@apache.org>.
jjohnson-arm commented on a change in pull request #4992: [Frontend][Torch] Check graph inputs match expected
URL: https://github.com/apache/incubator-tvm/pull/4992#discussion_r388323372
 
 

 ##########
 File path: python/tvm/relay/frontend/pytorch.py
 ##########
 @@ -902,6 +902,21 @@ def _report_missing_conversion(op_names):
         msg = "The following operators are not implemented: {}".format(missing)
         raise NotImplementedError(msg)
 
+def _check_input_names(graph, input_shapes):
+    """ Check the graph inputs match the inputs """
+    # remove self at the 0th arg
+    ir_inputs = _get_input_names(graph)[1:]
 
 Review comment:
   Fair enough - though I was just trying to avoid the extra graph.copy().

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services