Hzfengsy commented on code in PR #15919:
URL: https://github.com/apache/tvm/pull/15919#discussion_r1357860842
##########
python/tvm/relax/frontend/onnx/onnx_frontend.py:
##########
@@ -100,26 +100,35 @@ def get_constant(
return var
-def get_info(info_proto: onnx.onnx_ml_pb2.ValueInfoProto) -> Tuple[str, List,
str, List]:
+def get_info(
+ info_proto: onnx.onnx_ml_pb2.ValueInfoProto,
+ value_dict: Dict[str, tvm.tir.SizeVar]
+) -> Tuple[str, List, str, List, Dict]:
"""Extract the shape from a ValueInfoProto.
Parameters
----------
info_proto: onnx.onnx_ml_pb2.ValueInfoProto
The ValueInfoProto to extract the info from.
+ value_dict: Dict
+ The Dictionary mapping from the name of ValueInfoProto to SizeVar
+
Returns
-------
Tuple[str, List, str, List]
Review Comment:
```suggestion
Tuple[str, List, str, List, Dict]
```
##########
python/tvm/relax/frontend/onnx/onnx_frontend.py:
##########
@@ -100,26 +100,35 @@ def get_constant(
return var
-def get_info(info_proto: onnx.onnx_ml_pb2.ValueInfoProto) -> Tuple[str, List,
str, List]:
+def get_info(
+ info_proto: onnx.onnx_ml_pb2.ValueInfoProto,
+ value_dict: Dict[str, tvm.tir.SizeVar]
+) -> Tuple[str, List, str, List, Dict]:
"""Extract the shape from a ValueInfoProto.
Parameters
----------
info_proto: onnx.onnx_ml_pb2.ValueInfoProto
The ValueInfoProto to extract the info from.
+ value_dict: Dict
Review Comment:
```suggestion
value_dict: Dict[str, tvm.tir.SizeVar]
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]