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 2021/01/28 15:49:56 UTC

[GitHub] [tvm] leandron commented on a change in pull request #7359: [TVMC] Fix PyTorch support

leandron commented on a change in pull request #7359:
URL: https://github.com/apache/tvm/pull/7359#discussion_r566195003



##########
File path: python/tvm/driver/tvmc/common.py
##########
@@ -136,3 +138,40 @@ def tracker_host_port_from_cli(rpc_tracker_str):
         logger.info("RPC tracker port: %s", rpc_port)
 
     return rpc_hostname, rpc_port
+
+
+def parse_input_shapes(xs):
+    """Turn the string from --input-shape into a list.
+

Review comment:
       It would be good to have an example here, that describes the input format and expected output format, similar to what you have on `test_parse_input_shapes__turn_into_list`.

##########
File path: python/tvm/driver/tvmc/compiler.py
##########
@@ -59,6 +59,12 @@ def add_compile_parser(subparsers):
         default="",
         help="comma separarated list of formats to export, e.g. 'asm,ll,relay' ",
     )
+    parser.add_argument(
+        "--input-shape",
+        type=common.parse_input_shapes,
+        metavar="INPUT_SHAPE,[INPUT_SHAPE]...",
+        help="for PyTorch, e.g. '(1,3,224,224)'",

Review comment:
       Maybe clarify that it is in fact mandatory for PyTorch.




----------------------------------------------------------------
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