masahi commented on a change in pull request #7174:
URL: https://github.com/apache/tvm/pull/7174#discussion_r549600125
##########
File path: tests/python/frontend/pytorch/test_forward.py
##########
@@ -3437,6 +3437,16 @@ def test_fn(x, weights=None):
verify_trace_model(test_fn, [inp, weights], targets)
+def test_hard_swish():
+ hard_swish = torch.nn.Hardswish()
+ hard_swish_inplace = torch.nn.Hardswish(inplace=True)
+ examples = [torch.rand(8), torch.rand(8, 8), torch.rand(8, 16),
torch.rand(1, 1, 8)]
+ targets = ["llvm", "cuda"]
+ for input in examples:
+ verify_trace_model(hard_swish, [input], targets)
Review comment:
`verify_trace_model` is supposed to be used for dynamic models that
require VM compilation. Please use `verify_model` instead.
----------------------------------------------------------------
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]