Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
eager quant: fix error with removing forward hooks (pytorch#49813)
Summary: Pull Request resolved: pytorch#49813 pytorch#49739 reports a crash where removing forward hooks results in a ``` RuntimeError: OrderedDict mutated during iteration ``` Unfortunately I cannot repro this inside the PyTorch module, but the issue author has a good point and and we should not mutate the dict inside of the iteration. Test Plan: ``` // test plan from pytorch#46871 which // originally added this python test/test_quantization.py TestEagerModeQATOps ``` Imported from OSS Reviewed By: jerryzh168 Differential Revision: D25698725 fbshipit-source-id: 13069d0d5017a84038c8f7be439a3ed537938ac6
- Loading branch information