Skip to content

Conversation

@supriyar
Copy link
Contributor

@supriyar supriyar commented Sep 15, 2020

Stack from ghstack:

Summary:
Ensure fx module is scriptable after calling prepare_qat on it

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

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D23718380

Summary:
Ensure fx module is scriptable after calling prepare_qat on it

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

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
if hasattr(self.activation_post_process, 'ch_axis') else -1

@torch.jit.export
def enable_fake_quant(self, enabled=True):
Copy link
Contributor

Choose a reason for hiding this comment

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

these can actually just be global functions instead of residing in the module. maybe create an issue to track this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Filed #44751


# symbolically trace
model = symbolic_trace(model)
model = prepare_fx(model, qconfig_dict)
Copy link
Contributor

Choose a reason for hiding this comment

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

please use prepare_qat_fx here, we want to be more explicit

Summary:
Ensure fx module is scriptable after calling prepare_qat on it

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

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@dr-ci
Copy link

dr-ci bot commented Sep 15, 2020

💊 CI failures summary and remediations

As of commit 935e733 (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).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 10 times.

@dr-ci
Copy link

dr-ci bot commented Sep 15, 2020

💊 CI failures summary and remediations

As of commit 1ccb5d0 (more details on the Dr. CI page):


None of the CI failures appear to be your fault 💚



🚧 4 fixed upstream failures:

These were probably caused by upstream breakages that were already fixed.

Please rebase on the viable/strict branch (expand for instructions)

Since your merge base is older than viable/strict, run these commands:

git fetch https://github.com/pytorch/pytorch viable/strict
git rebase FETCH_HEAD

Check out the recency history of this "viable master" tracking branch.


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.

Summary:
Ensure fx module is scriptable after calling prepare_qat on it

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

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
Summary:
Ensure fx module is scriptable after calling prepare_qat on it

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

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@codecov
Copy link

codecov bot commented Sep 16, 2020

Codecov Report

Merging #44749 into gh/supriyar/178/base will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@                  Coverage Diff                  @@
##           gh/supriyar/178/base   #44749   +/-   ##
=====================================================
  Coverage                 68.08%   68.08%           
=====================================================
  Files                       384      384           
  Lines                     49768    49765    -3     
=====================================================
- Hits                      33886    33884    -2     
+ Misses                    15882    15881    -1     
Impacted Files Coverage Δ
torch/quantization/fake_quantize.py 96.38% <100.00%> (-0.09%) ⬇️
torch/quantization/observer.py 91.20% <100.00%> (-0.02%) ⬇️
torch/utils/_benchmark/utils/common.py 79.33% <0.00%> (-0.83%) ⬇️
torch/quantization/quantize_fx.py 98.11% <0.00%> (+3.77%) ⬆️

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 69839ea...935e733. Read the comment docs.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 3f512b0.

xuzhao9 pushed a commit that referenced this pull request Sep 18, 2020
Summary:
Pull Request resolved: #44749

Ensure fx module is scriptable after calling prepare_qat on it

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

Imported from OSS

Reviewed By: jerryzh168

Differential Revision: D23718380

fbshipit-source-id: abf63ffb21e707f7def8f6c88246877f5aded58c
@facebook-github-bot facebook-github-bot deleted the gh/supriyar/178/head branch September 20, 2020 14:17
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.

5 participants