masahi commented on a change in pull request #7134:
URL: https://github.com/apache/tvm/pull/7134#discussion_r546170570
##########
File path: tests/python/frontend/pytorch/test_forward.py
##########
@@ -1889,21 +1889,73 @@ def _get_default_vm_targets():
return [tgt for (tgt, _) in tvm.testing.enabled_targets()]
-def verify_script_model(pt_model, ishapes, targets):
+def verify_script_model(pt_model, ishapes, targets, idtype=None):
script_module = torch.jit.script(pt_model)
verify_model_vm(script_module, ishapes, targets=targets)
+ if idtype:
+ verify_model_vm(script_module, ishapes, idtype=idtype, targets=targets)
+ else:
+ verify_model_vm(script_module, ishapes, targets=targets)
+
Review comment:
I don't think you need this if/else, just
`verify_model_vm(script_module, ishapes, idtype=idtype, targets=targets)` even
if `idtype` is None should work.
----------------------------------------------------------------
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]