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

Enable oneDNN QConv FP32/BF16 output #112010

Conversation

leslie-fang-intel
Copy link
Collaborator

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

Stack from ghstack (oldest at bottom):

Summary

Test Plan

python -u -m pytest -s -v test_quantized_op.py -k test_qconv1d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv2d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv3d_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_float_output_pt2e

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

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

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 25, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit c13ee83 with merge base 0d95378 (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

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

@github-actions github-actions bot added module: cpu CPU specific problem (e.g., perf, algorithm) module: inductor ciflow/inductor labels Oct 25, 2023
leslie-fang-intel added a commit that referenced this pull request Oct 25, 2023
ghstack-source-id: c2cb5dafb6dc1cb9e3df891305b0e4d72a7f8fd1
Pull Request resolved: #112010
@leslie-fang-intel leslie-fang-intel marked this pull request as draft October 25, 2023 08:34
@leslie-fang-intel leslie-fang-intel changed the title Enable onednn.QConv FP32/BF16 output [WIP] Enable onednn.QConv FP32/BF16 output Oct 25, 2023
@leslie-fang-intel leslie-fang-intel added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 25, 2023
leslie-fang-intel added a commit that referenced this pull request Oct 25, 2023
ghstack-source-id: e970db7531249b5b9ed34fba2920dbe3cdc85e21
Pull Request resolved: #112010
@leslie-fang-intel leslie-fang-intel changed the title [WIP] Enable onednn.QConv FP32/BF16 output [WIP] Enable onednn QConv FP32/BF16 output Oct 25, 2023
cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler

[ghstack-poisoned]
@leslie-fang-intel leslie-fang-intel changed the title [WIP] Enable onednn QConv FP32/BF16 output Enable onednn QConv FP32/BF16 output Oct 26, 2023
leslie-fang-intel added a commit that referenced this pull request Oct 26, 2023
ghstack-source-id: 7761679717957944c7955fc5cc980788c411102f
Pull Request resolved: #112010
**Summary**
Enable QConv (relu, add, add_relu) with BFloat16 or Float32 output.

**Test Plan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qconv1d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv2d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv3d_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_float_output_pt2e
```

cc jgong5 mingfeima XiaobingSuper sanchitintel ashokei jingxu10 voznesenskym penguinwu EikanWang Guobing-Chen 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 26, 2023
ghstack-source-id: fc5934481d0eef3772f9fe1123986b484c592793
Pull Request resolved: #112010
**Summary**
Enable QConv (relu, add, add_relu) with BFloat16 or Float32 output.

**Test Plan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qconv1d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv2d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv3d_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_float_output_pt2e
```

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

[ghstack-poisoned]
aten/src/ATen/native/quantized/cpu/qconv.cpp Outdated Show resolved Hide resolved
**Summary**

- PR 1 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable QConv (relu, add, add_relu) with BFloat16 or Float32 output.


**Test Plan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qconv1d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv2d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv3d_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_float_output_pt2e
```

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

[ghstack-poisoned]
leslie-fang-intel added a commit to leslie-fang-intel/pytorch that referenced this pull request Nov 3, 2023
ghstack-source-id: af28fba9e9a2d6a03f9efe18496a9c173143ecd2
Pull Request resolved: pytorch#112010
leslie-fang-intel added a commit to leslie-fang-intel/pytorch that referenced this pull request Nov 3, 2023
ghstack-source-id: af28fba9e9a2d6a03f9efe18496a9c173143ecd2
Pull Request resolved: pytorch#112010
**Summary**

- PR 1 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable QConv (relu, add, add_relu) with BFloat16 or Float32 output.


**Test Plan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qconv1d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv2d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv3d_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_float_output_pt2e
```

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

[ghstack-poisoned]
leslie-fang-intel added a commit to leslie-fang-intel/pytorch that referenced this pull request Nov 3, 2023
ghstack-source-id: 452927ed3a4125a3e817749bed4ae57cab0afe24
Pull Request resolved: pytorch#112010
@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 pushed a commit that referenced this pull request Nov 3, 2023
**Summary**
- PR 2 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Enable QLinear (relu) with BFloat16 or Float32 output.

**TestPlan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qlinear_pt2e
```

Pull Request resolved: #112126
Approved by: https://github.com/jerryzh168, https://github.com/jgong5
ghstack dependencies: #112010
pytorchmergebot pushed a commit that referenced this pull request Nov 3, 2023
…torQuantizer (#112140)

**Summary**
- PR 3 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor #111640.
- Remove the output annotation of QConv/QLinear in X86InductorQuantizer.

**Test Plan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qconv2d
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
python -m pytest test_x86inductor_quantizer.py -k Conv2d
python -m pytest test_x86inductor_quantizer.py -k Linear
```

Pull Request resolved: #112140
Approved by: https://github.com/jgong5, https://github.com/jerryzh168
ghstack dependencies: #112010, #112126
@facebook-github-bot facebook-github-bot deleted the gh/leslie-fang-intel/33/head branch November 6, 2023 15:25
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
**Summary**

- PR 1 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor pytorch#111640.
- Enable QConv (relu, add, add_relu) with BFloat16 or Float32 output.

**Test Plan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qconv1d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv2d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv3d_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_float_output_pt2e
```

Pull Request resolved: pytorch#112010
Approved by: https://github.com/jerryzh168, https://github.com/jgong5
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
**Summary**
- PR 2 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor pytorch#111640.
- Enable QLinear (relu) with BFloat16 or Float32 output.

**TestPlan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qlinear_pt2e
```

Pull Request resolved: pytorch#112126
Approved by: https://github.com/jerryzh168, https://github.com/jgong5
ghstack dependencies: pytorch#112010
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
…torQuantizer (pytorch#112140)

**Summary**
- PR 3 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor pytorch#111640.
- Remove the output annotation of QConv/QLinear in X86InductorQuantizer.

**Test Plan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qconv2d
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
python -m pytest test_x86inductor_quantizer.py -k Conv2d
python -m pytest test_x86inductor_quantizer.py -k Linear
```

Pull Request resolved: pytorch#112140
Approved by: https://github.com/jgong5, https://github.com/jerryzh168
ghstack dependencies: pytorch#112010, pytorch#112126
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
**Summary**

- PR 1 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor pytorch#111640.
- Enable QConv (relu, add, add_relu) with BFloat16 or Float32 output.

**Test Plan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qconv1d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv2d_pt2e
python -u -m pytest -s -v test_quantized_op.py -k test_qconv3d_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_pt2e
python -u -m pytest test_quantized_op.py -k test_qconv2d_add_relu_float_output_pt2e
```

Pull Request resolved: pytorch#112010
Approved by: https://github.com/jerryzh168, https://github.com/jgong5
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
**Summary**
- PR 2 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor pytorch#111640.
- Enable QLinear (relu) with BFloat16 or Float32 output.

**TestPlan**
```
python -u -m pytest -s -v test_quantized_op.py -k test_qlinear_pt2e
```

Pull Request resolved: pytorch#112126
Approved by: https://github.com/jerryzh168, https://github.com/jgong5
ghstack dependencies: pytorch#112010
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
…torQuantizer (pytorch#112140)

**Summary**
- PR 3 for enabling Int8-Mixed-BF16 PT2E PTQ Quantization with Inductor pytorch#111640.
- Remove the output annotation of QConv/QLinear in X86InductorQuantizer.

**Test Plan**
```
python -m pytest test_mkldnn_pattern_matcher.py -k test_qconv2d
python -m pytest test_mkldnn_pattern_matcher.py -k test_qlinear
python -m pytest test_x86inductor_quantizer.py -k Conv2d
python -m pytest test_x86inductor_quantizer.py -k Linear
```

Pull Request resolved: pytorch#112140
Approved by: https://github.com/jgong5, https://github.com/jerryzh168
ghstack dependencies: pytorch#112010, pytorch#112126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: cpu CPU specific problem (e.g., perf, algorithm) module: inductor open source release notes: quantization release notes category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants