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
Summary: #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 #46871 which // originally added this python test/test_quantization.py TestEagerModeQATOps ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: b7ef4e3c381c9451b2a6368c69f27e345837aee9 Pull Request resolved: #49813
- Loading branch information