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

[quant][pt2][be] Rewrite QAT annotations using subgraph matcher #113709

Closed
wants to merge 7 commits into from

Commits on Nov 14, 2023

  1. [quant][pt2][be] Rewrite QAT annotations using subgraph matcher

    Summary: This is the recommended way to write quantizers according
    to https://pytorch.org/tutorials/prototype/pt2e_quantizer.html#a-note-on-ir-for-pt2e-quantization-flow.
    It is agnostic to changes in the aten IR and can be easily extended
    to support conv1d-bn and conv3d-bn fusion patterns in the future.
    This is the first step towards rewriting XNNPACKQuantizer using
    this subgraph matcher.
    
    Test Plan:
    python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d
    
    Reviewers: jerryzh168, kimishpatel
    
    Subscribers: jerryzh168, kimishpatel, supriyar
    
    [ghstack-poisoned]
    andrewor14 committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    a2f11d6 View commit details
    Browse the repository at this point in the history
  2. Update on "[quant][pt2][be] Rewrite QAT annotations using subgraph ma…

    …tcher"
    
    Summary: This is the recommended way to write quantizers according
    to https://pytorch.org/tutorials/prototype/pt2e_quantizer.html#a-note-on-ir-for-pt2e-quantization-flow.
    It is agnostic to changes in the aten IR and can be easily extended
    to support conv1d-bn and conv3d-bn fusion patterns in the future.
    This is the first step towards rewriting XNNPACKQuantizer using
    this subgraph matcher.
    
    Test Plan:
    python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d
    
    Reviewers: jerryzh168, kimishpatel
    
    Subscribers: jerryzh168, kimishpatel, supriyar
    
    [ghstack-poisoned]
    andrewor14 committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    9e1cb83 View commit details
    Browse the repository at this point in the history
  3. Update on "[quant][pt2][be] Rewrite QAT annotations using subgraph ma…

    …tcher"
    
    Summary: This is the recommended way to write quantizers according
    to https://pytorch.org/tutorials/prototype/pt2e_quantizer.html#a-note-on-ir-for-pt2e-quantization-flow.
    It is agnostic to changes in the aten IR and can be easily extended
    to support conv1d-bn and conv3d-bn fusion patterns in the future.
    This is the first step towards rewriting XNNPACKQuantizer using
    this subgraph matcher.
    
    Test Plan:
    python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d
    
    Reviewers: jerryzh168, kimishpatel
    
    Subscribers: jerryzh168, kimishpatel, supriyar
    
    [ghstack-poisoned]
    andrewor14 committed Nov 14, 2023
    Configuration menu
    Copy the full SHA
    b4f48be View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2023

  1. Update on "[quant][pt2][be] Rewrite QAT annotations using subgraph ma…

    …tcher"
    
    Summary: This is the recommended way to write quantizers according
    to https://pytorch.org/tutorials/prototype/pt2e_quantizer.html#a-note-on-ir-for-pt2e-quantization-flow.
    It is agnostic to changes in the aten IR and can be easily extended
    to support conv1d-bn and conv3d-bn fusion patterns in the future.
    This is the first step towards rewriting XNNPACKQuantizer using
    this subgraph matcher.
    
    Test Plan:
    python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d
    
    Reviewers: jerryzh168, kimishpatel
    
    Subscribers: jerryzh168, kimishpatel, supriyar
    
    [ghstack-poisoned]
    andrewor14 committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    126bb11 View commit details
    Browse the repository at this point in the history
  2. Update on "[quant][pt2][be] Rewrite QAT annotations using subgraph ma…

    …tcher"
    
    Summary: This is the recommended way to write quantizers according
    to https://pytorch.org/tutorials/prototype/pt2e_quantizer.html#a-note-on-ir-for-pt2e-quantization-flow.
    It is agnostic to changes in the aten IR and can be easily extended
    to support conv1d-bn and conv3d-bn fusion patterns in the future.
    This is the first step towards rewriting XNNPACKQuantizer using
    this subgraph matcher.
    
    Test Plan:
    python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d
    
    Reviewers: jerryzh168, kimishpatel
    
    Subscribers: jerryzh168, kimishpatel, supriyar
    
    [ghstack-poisoned]
    andrewor14 committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    14cf944 View commit details
    Browse the repository at this point in the history
  3. Update on "[quant][pt2][be] Rewrite QAT annotations using subgraph ma…

    …tcher"
    
    Summary: This is the recommended way to write quantizers according
    to https://pytorch.org/tutorials/prototype/pt2e_quantizer.html#a-note-on-ir-for-pt2e-quantization-flow.
    It is agnostic to changes in the aten IR and can be easily extended
    to support conv1d-bn and conv3d-bn fusion patterns in the future.
    This is the first step towards rewriting XNNPACKQuantizer using
    this subgraph matcher.
    
    Test Plan:
    python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d
    
    Reviewers: jerryzh168, kimishpatel
    
    Subscribers: jerryzh168, kimishpatel, supriyar
    
    [ghstack-poisoned]
    andrewor14 committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    b23eb43 View commit details
    Browse the repository at this point in the history
  4. Update on "[quant][pt2][be] Rewrite QAT annotations using subgraph ma…

    …tcher"
    
    Summary: This is the recommended way to write quantizers according
    to https://pytorch.org/tutorials/prototype/pt2e_quantizer.html#a-note-on-ir-for-pt2e-quantization-flow.
    It is agnostic to changes in the aten IR and can be easily extended
    to support conv1d-bn and conv3d-bn fusion patterns in the future.
    This is the first step towards rewriting XNNPACKQuantizer using
    this subgraph matcher.
    
    Test Plan:
    python test/test_quantization.py TestQuantizePT2EQAT_ConvBn2d
    
    Reviewers: jerryzh168, kimishpatel
    
    Subscribers: jerryzh168, kimishpatel, supriyar
    
    Differential Revision: [D51366525](https://our.internmc.facebook.com/intern/diff/D51366525)
    
    [ghstack-poisoned]
    andrewor14 committed Nov 15, 2023
    Configuration menu
    Copy the full SHA
    89df0e4 View commit details
    Browse the repository at this point in the history