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 2021/07/20 01:13:46 UTC
[GitHub] [tvm] comaniac commented on a change in pull request #8506: [TensorRT, BYOC] Handling a corner case in TRT RemoveDropout pass
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: commits-unsubscribe@tvm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org