mshr-h commented on code in PR #16123:
URL: https://github.com/apache/tvm/pull/16123#discussion_r1403845026
##########
tests/python/frontend/pytorch/test_forward.py:
##########
@@ -5432,6 +5430,46 @@ def forward(self, *args):
verify_model(Swapaxes3().float().eval(), input_data=input_data)
+def test_linalg_vector_norm():
+ """test_linalg_vector_norm"""
+ torch.set_grad_enabled(False)
+ input_shape = [3, 3]
+
+ class VectorNorm1(torch.nn.Module):
+ def forward(self, x):
+ return torch.linalg.vector_norm(x)
+
+ class VectorNorm2(torch.nn.Module):
+ def forward(self, x):
+ return torch.linalg.vector_norm(x, ord=3.5)
+
+ class VectorNorm3(torch.nn.Module):
+ def forward(self, x):
+ return torch.linalg.vector_norm(x, ord=np.inf)
+
+ class VectorNorm4(torch.nn.Module):
+ def forward(self, x):
+ return torch.linalg.vector_norm(x, ord=-np.NINF)
+
+ class VectorNorm5(torch.nn.Module):
+ def forward(self, x):
+ return torch.linalg.vector_norm(x, ord=0)
Review Comment:
@masahi Revised as suggested. Please review. Thanks!
--
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]