Skip to content

Conversation

@jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Apr 1, 2022

…ckend_config_dict

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Apr 1, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 7a8e312 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Apr 1, 2022
…ckend_config_dict

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 1dbd088
Pull Request resolved: #75135
@jerryzh168 jerryzh168 requested review from andrewor14 and vkuzo April 1, 2022 20:56
@jerryzh168
Copy link
Contributor Author

@jerryzh168 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@jerryzh168 jerryzh168 requested a review from vkuzo April 4, 2022 23:30
@jerryzh168
Copy link
Contributor Author

@jerryzh168 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
Comment on lines +312 to +313
# What we want to put here is the requirement on observers, in this case dtype,
# quant_min, quant_max etc., but we need to first move all configs to
Copy link
Contributor

Choose a reason for hiding this comment

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

quant_min, quant_max are internal variables to observers. I think restrictions in backend_config_dict should be on the public API only, such as scale and zero_point.

Copy link
Contributor Author

@jerryzh168 jerryzh168 Apr 5, 2022

Choose a reason for hiding this comment

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

makes sense, yeah we can put scale/zero_point constraints here in the future

…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…odule in backend_config_dict"

Summary:
Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@jerryzh168
Copy link
Contributor Author

@jerryzh168 has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

facebook-github-bot pushed a commit that referenced this pull request Apr 6, 2022
…ckend_config_dict (#75135)

Summary:
Pull Request resolved: #75135

Some operators have fixed quantization parameters, this PR adds the support to override the
qconfig in the backend_config_dict

Test Plan:
python test/test_quantization.py TestQuantizeFx
python test/test_quantization.py TestQuantizeFxOps

Imported from OSS

Reviewed By: vkuzo

Differential Revision: D35334279

fbshipit-source-id: 390510bd8fc2d61004c36c54390989583e6519ce
@github-actions
Copy link
Contributor

github-actions bot commented Apr 6, 2022

Hey @jerryzh168.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/765/head branch April 9, 2022 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants