You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "HongHongHongL (via GitHub)" <gi...@apache.org> on 2023/10/12 09:28:18 UTC

[PR] [Unity] Fix bug in onnx_frontend when multi inputs have same symbolic shape [tvm]

HongHongHongL opened a new pull request, #15919:
URL: https://github.com/apache/tvm/pull/15919

   AssertionError: For Expr having ShapeStructInfo, emit_te now only supports ShapeExpr


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


Re: [PR] [Unity] Fix bug in onnx_frontend when multi inputs have same symbolic shape [tvm]

Posted by "HongHongHongL (via GitHub)" <gi...@apache.org>.
HongHongHongL commented on code in PR #15919:
URL: https://github.com/apache/tvm/pull/15919#discussion_r1357805167


##########
python/tvm/relax/frontend/onnx/onnx_frontend.py:
##########
@@ -100,14 +100,17 @@ 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={}) -> Tuple[str, List, str, List]:

Review Comment:
   `value_dict` should be the input of the function. When a symbol appears for the second time, the value in the dict should be used.



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


Re: [PR] [Unity] Fix bug in onnx_frontend when multi inputs have same symbolic shape [tvm]

Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
Hzfengsy merged PR #15919:
URL: https://github.com/apache/tvm/pull/15919


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


Re: [PR] [Unity] Fix bug in onnx_frontend when multi inputs have same symbolic shape [tvm]

Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
Hzfengsy commented on code in PR #15919:
URL: https://github.com/apache/tvm/pull/15919#discussion_r1356599225


##########
python/tvm/relax/frontend/onnx/onnx_frontend.py:
##########
@@ -100,14 +100,17 @@ 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={}) -> Tuple[str, List, str, List]:

Review Comment:
   if `value_dict` is the output of the function, please move it to the return values, instead of reference param



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


Re: [PR] [Unity] Fix bug in onnx_frontend when multi inputs have same symbolic shape [tvm]

Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
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: commits-unsubscribe@tvm.apache.org

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