pytorch
bc512253 - [Quant][test] Added test to check if fp16 packing->unpacking yields the same result as to(torch.float16).to(torch.float32) [reland] (#73808)

Commit
3 years ago
[Quant][test] Added test to check if fp16 packing->unpacking yields the same result as to(torch.float16).to(torch.float32) [reland] (#73808) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/73808 A test was added in test_quantized_op.py that checks whether the fp16 packing and subsequent unpacking of a given fp32 tensor produces the same result as to(torch.float16).to(torch.float32) Test Plan: in pytorch main directory, execute ``` python test/test_quantization.py TestDynamicQuantizedOps.test_linear_prepack_fp16_numerics ``` in pytorch main directory, execute ``` python test/test_quantization.py TestDynamicQuantizedOps.test_pack_unpack_fp16 ``` in pytorch main directory, execute ``` python test/test_quantization.py TestDynamicQuantizedOps.test_pack_unpack_fp16 ``` Imported from OSS Pulled By: dzdang fbshipit-source-id: 5da453e5db4801dde196424282140726c8a4ef1f (cherry picked from commit ac8910e7feb4eebf677c99f287d48915165a87bf) dzdang Differential Revision: D34650372 D34650372 fbshipit-source-id: f58a2a964ddf259af3909b0e961d0b0dfd0e35e2 (cherry picked from commit df8d5536e94c08ce24c824da59bbd039217ce0cd)
Author
Committer
Parents
Loading