jwfromm commented on code in PR #13602:
URL: https://github.com/apache/tvm/pull/13602#discussion_r1046563723


##########
python/tvm/relay/frontend/onnx.py:
##########
@@ -4008,6 +4008,22 @@ def _impl_v1(cls, inputs, attr, params):
         for var in else_free_vars:
             graph_scope._nodes.update({var.name_hint: var})
 
+        # Sometimes pytorch to onnx will insert silly if statements that 
produce dynamic ranks.
+        # Often these dont contribute anything. If we see a dynamic rank 
output, try to unify
+        # them so we can continue without breaking.
+        then_shape = infer_shape(then_expr)

Review Comment:
   @ehsanmok noted that he's working on exposing Optional types in relay that 
may allow a more elegant solution once it lands.



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

Reply via email to