Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memory efficient per-channel fq: use it everywhere, delete old version #51265

Closed
wants to merge 2 commits into from

Commits on Jan 28, 2021

  1. memory efficient per-channel fq: use it everywhere, delete old version

    Summary:
    
    This PR is the cleanup after #51159. High level, we make the new
    definition of fake_quant per channel be the definition used by autograd, but keep the old
    function around as a thin wrapper to keep the user facing API the same.
    
    In detail:
    
    1. point fake_quantize_per_channel_affine's implementation to be fake_quantize_per_channel_affine_cachemask
    2. delete the fake_quantize_per_channel_affine backward, autograd will automatically use the cachemask backward
    3. delete all the fake_quantize_per_channel_affine kernels, since they are no longer used by anything
    
    Test Plan:
    
    ```
    python test/test_quantization.py TestFakeQuantize
    ```
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Tags:
    
    [ghstack-poisoned]
    vkuzo committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    3b53e9b View commit details
    Browse the repository at this point in the history
  2. Update on "memory efficient per-channel fq: use it everywhere, delete…

    … old version"
    
    Summary:
    
    This PR is the cleanup after #51159. High level, we make the new
    definition of fake_quant per channel be the definition used by autograd, but keep the old
    function around as a thin wrapper to keep the user facing API the same.
    
    In detail:
    
    1. point fake_quantize_per_channel_affine's implementation to be fake_quantize_per_channel_affine_cachemask
    2. delete the fake_quantize_per_channel_affine backward, autograd will automatically use the cachemask backward
    3. delete all the fake_quantize_per_channel_affine kernels, since they are no longer used by anything
    
    Test Plan:
    
    ```
    python test/test_quantization.py TestFakeQuantize
    ```
    
    Reviewers:
    
    Subscribers:
    
    Tasks:
    
    Tags:
    
    [ghstack-poisoned]
    vkuzo committed Jan 28, 2021
    Configuration menu
    Copy the full SHA
    2830016 View commit details
    Browse the repository at this point in the history