-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[refactor] Remove test_quantizer.py and reuse one of its test in test_quantization.py
#27269
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
Conversation
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]
…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]
|
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)? |
|
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 |
…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]
…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]) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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): |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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]
test_quantizer.py and reuse one of its test in test_quantization.py
… 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]
ZolotukhinM
left a comment
There was a problem hiding this 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]
…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
|
This pull request has been merged in 1c436de. |
Stack from ghstack:
test_quantizer.pyand reuse one of its test intest_quantization.py#27269 [refactor] Removetest_quantizer.pyand reuse one of its test intest_quantization.pySummary:
Remove
test_quantizer.py, add and rewrite one of the tests intest_quantizerin
test_quantization.pyThe 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