Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fake_quantize: respect device affinity
Summary: Makes the eager mode QAT prepare logic respect device affinity. This fixes the issue where a module is on `cuda:0`, and running the QAT prepare script would add observers on `cpu`. Now it will add them on the original device. Test Plan: ``` python test/test_quantization.py TestDistributed.test_device_affinity ``` Reviewers: Subscribers: Tasks: Tags: ghstack-source-id: f14b10e950fb2c477126f9a137161a7f97239b5d Pull Request resolved: #39031
- Loading branch information
Showing
2 changed files
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters