wrongtest commented on code in PR #11032:
URL: https://github.com/apache/tvm/pull/11032#discussion_r851790532


##########
tests/python/topi/python/test_topi_lrn.py:
##########
@@ -66,6 +65,7 @@ def test_lrn():
     verify_lrn((1, 3, 5, 5), 3, 1, 1.0, 1.0, 0.5)
     verify_lrn((1, 3, 5, 5), 3, 3, 1.0, 1.0, 0.5)
     verify_lrn((1, 3, 20, 20), 3, 1, 2.0, 1.0, 0.75)
+    verify_lrn((1, 3, 5, 5), 3, 3, 1.0, 1.0, 0.5, dtype="float16", rtol=1e-3, 
atol=1e-3)

Review Comment:
   Yes, It seems that original rtol 1e5 not work with f16. It failed on my 
machine like
   ```
   Mismatched elements: 4 / 75 (5.33%)
   Max absolute difference: 0.000977
   Max relative difference: 0.001402
    x: array([[[[2.761e-01, 3.909e-01, 2.979e-01, 1.460e-01, 1.453e-01],
            [7.842e-01, 7.104e-01, 3.000e-01, 7.490e-01, 5.640e-01],
            [1.940e-01, 1.163e-01, 6.709e-01, 1.050e-01, 5.229e-01],...
    y: array([[[[2.761e-01, 3.909e-01, 2.979e-01, 1.460e-01, 1.453e-01],
            [7.842e-01, 7.100e-01, 3.000e-01, 7.490e-01, 5.640e-01],
            [1.940e-01, 1.163e-01, 6.709e-01, 1.050e-01, 5.229e-01],...
   ```



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

Reply via email to