gemini-code-assist[bot] commented on code in PR #19994:
URL: https://github.com/apache/tvm/pull/19994#discussion_r3570650551


##########
tests/python/relax/test_frontend_dynamo.py:
##########
@@ -177,7 +177,7 @@ def Func1(x, y):
         x = torch.randn(s, 100)
         y = torch.randn(s, 100)
         with torch.no_grad():
-            tvm.testing.assert_allclose(opt_func(x, y), opt_func(x, y))
+            tvm.testing.assert_allclose(Func1(x, y), opt_func(x, y))

Review Comment:
   ![medium](https://www.gstatic.com/codereviewagent/medium-priority.svg)
   
   For consistency with other tests in this file and to prevent potential test 
flakiness, it is recommended to convert the PyTorch tensors to NumPy arrays 
using `.numpy()` and explicitly specify the tolerances `rtol=1e-5` and 
`atol=1e-5` instead of relying on the strict default tolerances of 
`assert_allclose`.
   
   ```suggestion
               tvm.testing.assert_allclose(Func1(x, y).numpy(), opt_func(x, 
y).numpy(), rtol=1e-5, atol=1e-5)
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to