comaniac commented on a change in pull request #8506:
URL: https://github.com/apache/tvm/pull/8506#discussion_r672735819



##########
File path: python/tvm/relay/op/contrib/tensorrt.py
##########
@@ -1033,6 +1033,8 @@ def visit_tuple_getitem(self, op):
         visit = super().visit_tuple_getitem(op)
         if visit.index != 0:
             return visit
+        if isinstance(visit.tuple_value, Call) and 
isinstance(visit.tuple_value.op, Let):
+            return visit

Review comment:
       This looks a bit ad-hoc to me. Suggest as follows. Note that I'm not 
sure if `isinstance(visit.tuple_value.op, Op)` is the correct expression but 
you should know what I meant.
   
   ```
   if isinstance(visit.tuple_value, Call):
     if isinstance(visit.tuple_value.op, Op) and visit.tuple_value.op.name == 
"nn.dropout" and visit.index == 0:
       return visit.tuple_value.args[0]
   return visit
   ```




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