Skip to content
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

[Inductor] [Quant] Enable QLinear int8-mixed-bf16 Lowering #112486

Conversation

leslie-fang-intel
Copy link
Collaborator

@leslie-fang-intel leslie-fang-intel commented Oct 31, 2023

Stack from ghstack (oldest at bottom):

Summary

TestPlan

python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler

@pytorch-bot
Copy link

pytorch-bot bot commented Oct 31, 2023

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/112486

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 08aceee with merge base eb15340 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

**Summary**
- PR 6 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Oct 31, 2023
ghstack-source-id: efdd491d143e62dff0c001e3e93c25cd413aec9a
Pull Request resolved: #112486
**Summary**
- PR 6 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Nov 1, 2023
ghstack-source-id: 11d7c513dc9eceaa00cf9040fc19c0a2ab169052
Pull Request resolved: #112486
**Summary**
- PR 6 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Nov 1, 2023
ghstack-source-id: 7b02bcb3054439cd276f14bf69d1f5cce96e4e27
Pull Request resolved: #112486
**Summary**
- PR 6 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Nov 1, 2023
ghstack-source-id: 7b02bcb3054439cd276f14bf69d1f5cce96e4e27
Pull Request resolved: #112486
@leslie-fang-intel leslie-fang-intel marked this pull request as ready for review November 1, 2023 02:17
**Summary**
- PR 7 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Nov 2, 2023
ghstack-source-id: 993d1e024cb473d02b1b0d081d3f1b11f2c51ccd
Pull Request resolved: #112486
**Summary**
- PR 7 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Nov 2, 2023
ghstack-source-id: 602000ad05296e6b255b0e00d72536aec19e26d7
Pull Request resolved: #112486
leslie-fang-intel added a commit that referenced this pull request Nov 3, 2023
ghstack-source-id: 5dcf1b614cff856f96027bd9b6b1bde2635efd48
Pull Request resolved: #112486
**Summary**
- PR 7 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Nov 4, 2023
ghstack-source-id: f761f79300d4759f60d7c72ce553378bfca801b0
Pull Request resolved: #112486
@leslie-fang-intel
Copy link
Collaborator Author

Hi @jgong5, please help take look of this PR also.

Comment on lines +1172 to +1176
if (
len(list(to_fp32_node.users)) != 1
or len(list(sub_node.users)) != 1
or len(list(mul_node.users)) != 1
):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should be able to match this in the pattern.

**Summary**
- PR 7 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Nov 10, 2023
ghstack-source-id: d7da88230a860176f6c1587a4dc435b4b794c13d
Pull Request resolved: #112486
@leslie-fang-intel
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: Command git -C /home/runner/work/pytorch/pytorch cherry-pick -x f1d028f18954d092f707fad41df43fd83b1a51fa returned non-zero exit code 1

Auto-merging test/inductor/test_mkldnn_pattern_matcher.py
CONFLICT (content): Merge conflict in test/inductor/test_mkldnn_pattern_matcher.py
error: could not apply f1d028f1895... Enable QLinear int8-mixed-bf16 Lowering
hint: After resolving the conflicts, mark them with
hint: "git add/rm <pathspec>", then run
hint: "git cherry-pick --continue".
hint: You can instead skip this commit with "git cherry-pick --skip".
hint: To abort and get back to the state before "git cherry-pick",
hint: run "git cherry-pick --abort".
Details for Dev Infra team Raised by workflow job

**Summary**
- PR 7 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Nov 10, 2023
ghstack-source-id: 4cde6e5121be8242b92ce943bf6244a6c4a3358a
Pull Request resolved: #112486
@leslie-fang-intel
Copy link
Collaborator Author

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@facebook-github-bot facebook-github-bot deleted the gh/leslie-fang-intel/39/head branch November 13, 2023 15:25
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
…12486)

**Summary**
- PR 7 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor pytorch#111640.
- Enable the QLinear int8-mixed-bf16 weight prepack and post grad lowering inside inductor.

**TestPlan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
```

Pull Request resolved: pytorch#112486
Approved by: https://github.com/jgong5, https://github.com/eellison, https://github.com/jerryzh168
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.

None yet

6 participants