nolanliou commented on a change in pull request #6546:
URL: https://github.com/apache/incubator-tvm/pull/6546#discussion_r494123685
##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -3244,7 +3267,8 @@ def get_all_op_names(graph):
return set(node.kind() for node in nodes)
-def from_pytorch(script_module, input_shapes, custom_convert_map=None,
default_dtype="float32"):
+def from_pytorch(script_module, input_shapes, custom_convert_map=None,
default_dtype="float32",
+ input_types=None):
Review comment:
Just for forward compatibility. If not, one argument `input_info` maybe
the best choice.
##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -3254,10 +3259,14 @@ def from_pytorch(script_module, input_shapes,
custom_convert_map=None, default_d
TorchScripted PyTorch graph
Note: We currently only support traces (ie: torch.jit.trace(model,
input))
- input_shapes : List of tuples of input name and input dimensions
- Graph level input shape list
+ input_infos: List of tuples of input name and (input dimensions, input
types)
+ Graph level input shape and type list
The same input names need to be used for deployment, so choose easy to
remember names (such as: input0, input1)
+ e.g. [('input0', ((1, 2), 'int')), ('input1', ((3, 4), 'float'))]
+ supported data types: ['half', 'float', 'double', 'bool', 'char',
+ 'byte', 'short', 'int', 'long',
+ 'quint8', 'qint8', 'qint32', 'str']
Review comment:
https://github.com/apache/incubator-tvm/blob/master/python/tvm/relay/frontend/pytorch.py#L2416
from here
##########
File path: python/tvm/relay/frontend/pytorch.py
##########
@@ -3254,10 +3259,14 @@ def from_pytorch(script_module, input_shapes,
custom_convert_map=None, default_d
TorchScripted PyTorch graph
Note: We currently only support traces (ie: torch.jit.trace(model,
input))
- input_shapes : List of tuples of input name and input dimensions
- Graph level input shape list
+ input_infos: List of tuples of input name and (input dimensions, input
types)
+ Graph level input shape and type list
The same input names need to be used for deployment, so choose easy to
remember names (such as: input0, input1)
+ e.g. [('input0', ((1, 2), 'int')), ('input1', ((3, 4), 'float'))]
+ supported data types: ['half', 'float', 'double', 'bool', 'char',
+ 'byte', 'short', 'int', 'long',
+ 'quint8', 'qint8', 'qint32', 'str']
Review comment:
remove the comment
----------------------------------------------------------------
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:
[email protected]