larroy commented on a change in pull request #13857: float32 -> float16 cast
consistency across implementations
URL: https://github.com/apache/incubator-mxnet/pull/13857#discussion_r248658229
##########
File path: tests/python/unittest/test_operator.py
##########
@@ -3994,6 +3994,44 @@ def test_cast():
assert_almost_equal(exe.grad_arrays[0].asnumpy(),
X.astype(dsttype).astype(srctype), rtol=1e-3, atol=1e-5)
+# Test requires all platforms to round float32->float16 with same
round-to-nearest-even policy.
+@with_seed()
+def test_cast_float32_to_float16():
+ fp16_fraction_bits = 10
Review comment:
shall we capitalize constants as per PEP8?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services