AndrewZhaoLuo commented on code in PR #11171:
URL: https://github.com/apache/tvm/pull/11171#discussion_r863013165


##########
tests/python/frontend/onnx/test_forward.py:
##########
@@ -5174,6 +5172,10 @@ def test_onnx_nodes(target, dev, onnx_test):
         # roialign results to 4 decimal places
         atol = 1e-4
 
+    if "to_BFLOAT16" in test_dir:
+        # casting to BFLOAT has a larger accuracy loss
+        atol = 1

Review Comment:
   Oh rereviewing this, i was comparing two dissimilar arguments 🤦 . So the 
real + expected differ by at most one per element? Anyway, can you translate 
these uint16 values to the real numbers they represent under a re-interpret 
cast to bfloat16? This way you don't need to set the tolerance up by a ton.



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