Skip to content

Conversation

@jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Sep 1, 2020

Stack from ghstack:

Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:

  • register_static_quant_module_mapping

  • get_static_quant_module_mappings

  • get_static_quant_module_class

  • register_dynamic_quant_module_mapping

  • get_dynamic_quant_module_mappings

  • register_qat_module_mapping

  • get_qat_module_mappings

for fx graph mode quantization

  • register_quantized_operator
  • get_quantized_operator

Custom fusion API:

  • register_fuser_method
  • get_fuser_method

Example:

register_static_quant_module_mapping(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_mapping(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_mapping(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D23485344

…fusion mappings

Summary:
Allow user to register custom quantization and fusion patterns

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Sep 1, 2020
…fusion mappings

Summary:
Allow user to register custom quantization and fusion patterns

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 913f70a
Pull Request resolved: #43990
@dr-ci
Copy link

dr-ci bot commented Sep 1, 2020

💊 CI failures summary and remediations

As of commit 3dc9ab6 (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-CircleCI failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 127 times.

…zation and fusion mappings"

Summary:
Allow user to register custom quantization and fusion patterns

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…zation and fusion mappings"

Summary:
Allow user to register custom quantization and fusion patterns

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Sep 2, 2020
…fusion mappings

Summary:
Allow user to register custom quantization and fusion patterns

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 77e207d
Pull Request resolved: #43990
…zation and fusion mappings"

Summary:
Allow user to register custom quantization and fusion patterns

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@vkuzo
Copy link
Contributor

vkuzo commented Sep 2, 2020

nice! any chance we could add an example usage of this API to register a custom pattern to the PR summary? would make it easier to review

Copy link

@z-a-f z-a-f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

*data,
Logger=OutputLogger,
white_list=DEFAULT_NUMERIC_SUITE_COMPARE_MODEL_OUTPUT_WHITE_LIST,
white_list=None
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we change the white_list while we are at it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm afraid this is bc breaking, would be better to change all at once

…zation and fusion mappings"

Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
@jerryzh168
Copy link
Contributor Author

nice! any chance we could add an example usage of this API to register a custom pattern to the PR summary? would make it easier to review

done

…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
F.layer_norm: torch._ops.ops.quantized.layer_norm,
}

def register_static_quant_module_class(module_class, static_quant_module_class):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

optional, how about something like this to improve readability

def register_static_quant_module_swap(fp_source_module_class, static_quant_target_module_class):
    """Registers a module swap of {fp_source_module_class} to {static_quant_target_module_class} 
    during static quant convert step.  static_quant_target_module_class must have from_float 
    defined as a class method."""

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, will change to register_static_quant_module_mapping

…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_class
- get_static_quant_module_mapping
- get_static_quant_module_class

- register_dynamic_quant_module_class
- get_dynamic_quant_module_mapping

- register_qat_module_class
- get_qat_module_mapping

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_class(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_class(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
…zation and fusion mappings"


Summary:
Allow user to register custom quantization and fusion patterns

Custom quantization API:
- register_static_quant_module_mapping
- get_static_quant_module_mappings
- get_static_quant_module_class

- register_dynamic_quant_module_mapping
- get_dynamic_quant_module_mappings

- register_qat_module_mapping
- get_qat_module_mappings

for fx graph mode quantization
- register_quantized_operator
- get_quantized_operator

Custom fusion API:
- register_fuser_method
- get_fuser_method

Example:

```
register_static_quant_module_mapping(torch.nn.Conv2d, torch.nn.quantized.Conv2d)
register_dynamic_quant_module_mapping(torch.nn.Conv2d, torch.nn.quantized.dynamic.Conv2d)
register_qat_module_mapping(torch.nn.Conv2d, torch.nn.qat.Conv2d)
register_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d), fuse_conv_bn)

>> get_static_quant_module_class(torch.nn.Conv2d)
torch.nn.quantized.Conv2d

>> get_fuser_method((torch.nn.Conv2d, torch.nn.BatchNorm2d))
fuser_conv_bn
```

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D23485344](https://our.internmc.facebook.com/intern/diff/D23485344)

[ghstack-poisoned]
@codecov
Copy link

codecov bot commented Sep 11, 2020

Codecov Report

Merging #43990 into gh/jerryzh168/426/base will decrease coverage by 0.01%.
The diff coverage is 89.34%.

Impacted file tree graph

@@                    Coverage Diff                     @@
##           gh/jerryzh168/426/base   #43990      +/-   ##
==========================================================
- Coverage                   68.05%   68.04%   -0.02%     
==========================================================
  Files                         382      384       +2     
  Lines                       49468    49527      +59     
==========================================================
+ Hits                        33667    33699      +32     
- Misses                      15801    15828      +27     
Impacted Files Coverage Δ
torch/quantization/_numeric_suite.py 95.65% <80.00%> (-0.43%) ⬇️
torch/quantization/quantization_mappings.py 85.10% <85.10%> (ø)
torch/quantization/fuser_method_mappings.py 88.88% <88.88%> (ø)
torch/quantization/quantize.py 90.32% <90.90%> (ø)
torch/quantization/__init__.py 87.50% <100.00%> (+1.78%) ⬆️
torch/quantization/fuse_modules.py 98.14% <100.00%> (+1.85%) ⬆️
torch/quantization/fx/fusion_patterns.py 88.09% <100.00%> (+0.88%) ⬆️
torch/quantization/fx/quantization_patterns.py 91.89% <100.00%> (ø)
torch/quantization/fx/quantize.py 96.31% <100.00%> (ø)
torch/testing/_internal/common_quantization.py 89.57% <100.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a2a81e1...3dc9ab6. Read the comment docs.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 0c58a01.

bitfort pushed a commit that referenced this pull request Sep 11, 2020
…fusion mappings (#43990)

Summary:
Pull Request resolved: #43990

Allow user to register custom quantization and fusion patterns

Test Plan: Imported from OSS

Reviewed By: z-a-f

Differential Revision: D23485344

fbshipit-source-id: 4f0174ee6d8000d83de0f73cb370e9a1941d54aa
@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/426/head branch September 14, 2020 14:17
xuzhao9 pushed a commit that referenced this pull request Sep 18, 2020
…fusion mappings (#43990)

Summary:
Pull Request resolved: #43990

Allow user to register custom quantization and fusion patterns

Test Plan: Imported from OSS

Reviewed By: z-a-f

Differential Revision: D23485344

fbshipit-source-id: 4f0174ee6d8000d83de0f73cb370e9a1941d54aa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants