pytorch
f8eefbdf - fake_quant: fix device affinity and buffer resizing for state_dict (#50868)

Commit
4 years ago
fake_quant: fix device affinity and buffer resizing for state_dict (#50868) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/50868 Ensures that `FakeQuantize` respects device affinity when loading from state_dict, and knows how to resize scale and zero_point values (which is necessary for FQ classes wrapping per channel observers). This is same as https://github.com/pytorch/pytorch/pull/44537, but for `FakeQuantize`. Test Plan: ``` python test/test_quantization.py TestObserver.test_state_dict_respects_device_affinity ``` Imported from OSS Reviewed By: jerryzh168 Differential Revision: D25991570 fbshipit-source-id: 1193a6cd350bddabd625aafa0682e2e101223bb1
Author
Parents
Loading