codeislife99 commented on a change in pull request #6955:
URL: https://github.com/apache/tvm/pull/6955#discussion_r532914430



##########
File path: python/tvm/relay/op/contrib/tensorrt.py
##########
@@ -808,18 +884,22 @@ def is_valid_subgraph(params, body):
                     if len(tupe_type.shape) == 0:
                         logger.info("tensorrt: scalar inputs not supported")
                         return False
-                    input_batch_sizes.append(int(tupe_type.shape[0]))
+                    if not isinstance(tupe_type.shape[0], tvm.tir.expr.Any):
+                        input_batch_sizes.append(int(tupe_type.shape[0]))
             else:
                 # Scalar inputs not allowed
                 if len(var.checked_type.shape) == 0:
                     logger.info("tensorrt: scalar inputs not supported")
                     return False
-                input_batch_sizes.append(int(var.checked_type.shape[0]))
+                if not isinstance(var.checked_type.shape[0], tvm.tir.expr.Any):

Review comment:
       As discussed offline, there are usually multiple dynamic inputs to the 
TRT graph from current OD models. Therefore, I am adding a TODO to resolve this 
case of different dynamic batch sizes in a future PR.  




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


Reply via email to