You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/11/30 16:58:38 UTC

[GitHub] [tvm] anijain2305 commented on a change in pull request #6955: Dynamic Batch Support for TRT

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



##########
File path: python/tvm/relay/op/contrib/tensorrt.py
##########
@@ -198,6 +198,18 @@ def _func_wrapper(expr):
         if any([x.checked_type.dtype != "float32" for x in args]):
             logger.info("Only float32 inputs are supported for TensorRT.")
             return False
+        if op_name == "multiply":
+            shapes = [
+                [
+                    int(x) if not isinstance(x, tvm.tir.expr.Any) else -1
+                    for x in arg.checked_type.shape
+                ]
+                for arg in args
+            ]
+            if all(

Review comment:
       Please add a comment why this shape is important

##########
File path: tests/scripts/task_ci_python_setup.sh
##########
@@ -31,3 +31,4 @@ set -o pipefail
 echo "Addtiional setup in" ${CI_IMAGE_NAME}
 
 python3 -m pip install --user tlcpack-sphinx-addon==0.1.2 synr==0.2.1
+python3 -m pip install --user torch==1.6.0+cpu torchvision==0.7.0+cpu -f https://download.pytorch.org/whl/torch_stable.html

Review comment:
       Not sure if we can do this. @zhiics 

##########
File path: python/tvm/relay/op/contrib/tensorrt.py
##########
@@ -795,6 +839,38 @@ def conv3d_transpose_annotate_fn(expr):  # pylint: disable=unused-variable
     return True
 
 
+class IsComputeIntensiveGraph(ExprVisitor):
+    """
+    Visits the Graph recursively and checks if it contains compute heavy ops like convolutions and
+    its transpose, dense and batch mat-mul.
+    """
+
+    def __init__(self):
+        ExprVisitor.__init__(self)
+        self.is_compute_intensive = False
+
+    def visit_call(self, call):
+        heavy_ops = set(

Review comment:
       s/heavy_ops/compute_intensive_ops/




----------------------------------------------------------------
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:
users@infra.apache.org