pytorch/torch/testing
Gabriel Ferns a40e876b08 Support fp8 dtypes in assert_close (#150002)
Fixes #135998

Adds support for fp8. These are compared bitwise, without atol and rtol. The implementation uses the same comparison functions, just with atol and rtol forced to zero. The error message is different from the default case; it only tells the user the first mismatch. This is to avoid triggering the error from #135998.

Test Plan:
New unit test covers new code paths.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/150002
Approved by: https://github.com/cyyever, https://github.com/zou3519
2025-04-20 01:24:21 +00:00
..
_internal [DDP] add one option to allow skipping all reduce unused parameters (#151503) 2025-04-17 23:30:19 +00:00
__init__.py [BE][Easy][19/19] enforce style for empty lines in import segments in torch/[o-z]*/ (#129771) 2024-08-01 17:07:14 +00:00
_comparison.py Support fp8 dtypes in assert_close (#150002) 2025-04-20 01:24:21 +00:00
_creation.py PEP585 update - torch/testing (#145200) 2025-01-20 22:42:42 +00:00
_utils.py Fix code descriptions in the test package. (#148145) 2025-03-04 19:14:41 +00:00