Skip to content

Conversation

@jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Oct 3, 2019

Stack from ghstack:

Summary:
Remove test_quantizer.py, add and rewrite one of the tests in test_quantizer
in test_quantization.py
The conv test is removed for now since conv pattern is still broken, we'll add another test
later

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

Differential Revision: D18182916

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 3, 2019
Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

ghstack-source-id: 4e90912
Pull Request resolved: #27269
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 3, 2019
Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

ghstack-source-id: 04a71bf
Pull Request resolved: #27269
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@ZolotukhinM
Copy link

The added test looks differently from the two tests that were removed. Could you please explain in more details why this is equivalent (also, please add that to the commit message since right now it doesn't look like the test was moved)?

@jerryzh168
Copy link
Contributor Author

for test_quantizer.py, the first test is removed, the second one is the one we move to test_quantization, and I also modified a bit to make it pass

@jerryzh168 jerryzh168 requested a review from ZolotukhinM October 7, 2019 17:48
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@pytorchbot pytorchbot added the module: ci Related to continuous integration label Oct 10, 2019
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
result_eager = model_eager(self.calib_data[0][0])
torch._C._jit_pass_quant_fusion(model_script._c._get_module('fc1')._get_method('forward').graph)
result_script = model_script._c._get_method('forward')(self.calib_data[0][0])
result_script = get_forward(model_script._c)(self.calib_data[0][0])

Choose a reason for hiding this comment

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

Why did this change if that was just a move of the test?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is move + some modifications to make it pass I'll modify the message

self.assertEqual(result_eager, result_script)

@unittest.skip("quantization for inlined linear is not working right now")
def test_nested(self):

Choose a reason for hiding this comment

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

It seems that we had more tests before the move, could you please explain why they were changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the conv+bn test is added later after we fix the conv patterns

…ation.py"

Summary:
att
Also enable the tests

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@jerryzh168 jerryzh168 changed the title [refactor] Move tests in test_quantizer.py to test_quantization.py [refactor] Remove test_quantizer.py and reuse one of its test in test_quantization.py Oct 25, 2019
… test in `test_quantization.py`"


Summary:
Remove `test_quantizer.py`, add and rewrite one of the tests in `test_quantizer`
in `test_quantization.py`
The conv test is removed for now since conv pattern is still broken, we'll add another test
later

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
… test in `test_quantization.py`"


Summary:
Remove `test_quantizer.py`, add and rewrite one of the tests in `test_quantizer`
in `test_quantization.py`
The conv test is removed for now since conv pattern is still broken, we'll add another test
later

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
Copy link

@ZolotukhinM ZolotukhinM left a comment

Choose a reason for hiding this comment

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

Looks good! In future when you move stuff around please try to split it from non-mechanical changes for easier reviews.

… test in `test_quantization.py`"


Summary:
Remove `test_quantizer.py`, add and rewrite one of the tests in `test_quantizer`
in `test_quantization.py`
The conv test is removed for now since conv pattern is still broken, we'll add another test
later

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… test in `test_quantization.py`"


Summary:
Remove `test_quantizer.py`, add and rewrite one of the tests in `test_quantizer`
in `test_quantization.py`
The conv test is removed for now since conv pattern is still broken, we'll add another test
later

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… test in `test_quantization.py`"


Summary:
Remove `test_quantizer.py`, add and rewrite one of the tests in `test_quantizer`
in `test_quantization.py`
The conv test is removed for now since conv pattern is still broken, we'll add another test
later

Test Plan:
python test/test_quantization.py

Reviewers:
mvz

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Oct 29, 2019
…est_quantization.py`

Pull Request resolved: #27269



Remove `test_quantizer.py`, add and rewrite one of the tests in `test_quantizer`
in `test_quantization.py`
The conv test is removed for now since conv pattern is still broken, we'll add another test
later

Differential Revision: [D18182916](https://our.internmc.facebook.com/intern/diff/D18182916/)
ghstack-source-id: 92869823
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1c436de.

@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/109/head branch November 2, 2019 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged module: ci Related to continuous integration oncall: quantization Quantization support in PyTorch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants