Skip to content

Conversation

jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Jul 25, 2023

Stack from ghstack (oldest at bottom):

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
python test/test_quantization.py TestQuantizePT2E

Reviewers:

Subscribers:

Tasks:

Tags:

…serialization

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
python test/test_quantization.py TestQuantizePT2E

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented Jul 25, 2023

🔗 Helpful Links

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

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

✅ 2 Unrelated Failures

As of commit ac16b45:

UNSTABLE - The following jobs failed but were likely due to flakiness present on trunk and has been marked as unstable:

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

@pytorch-bot pytorch-bot bot added release notes: quantization release notes category labels Jul 25, 2023
…to support serialization"

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
python test/test_quantization.py TestQuantizePT2E

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…to support serialization"

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
python test/test_quantization.py TestQuantizePT2E

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Jul 25, 2023
…serialization

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
python test/test_quantization.py TestQuantizePT2E

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 5522977
Pull Request resolved: #105894
@jerryzh168
Copy link
Contributor Author

@jerryzh168 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

…to support serialization"

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
python test/test_quantization.py TestQuantizePT2E

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Jul 25, 2023
…serialization

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
python test/test_quantization.py TestQuantizePT2E

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e281fa3
Pull Request resolved: #105894
@jerryzh168
Copy link
Contributor Author

@jerryzh168 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@jerryzh168
Copy link
Contributor Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jul 26, 2023
@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

@PaliC
Copy link
Contributor

PaliC commented Jul 27, 2023

@pytorchbot revert -m "breaking executorch tests internally" -c ghfirst

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

Can't revert PR that was landed via phabricator as D47770963. Please revert by going to the internal diff and clicking Unland.

@PaliC
Copy link
Contributor

PaliC commented Jul 28, 2023

@pytorchbot revert -m "breaking executorch tests internally" -c ghfirst

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

Can't revert PR that was landed via phabricator as D47770963. Please revert by going to the internal diff and clicking Unland.

@pytorchmergebot
Copy link
Collaborator

Can't revert PR that was landed via phabricator as D47770963. Please revert by going to the internal diff and clicking Unland.

@huydhn
Copy link
Contributor

huydhn commented Jul 28, 2023

@pytorchbot revert -m "breaking executorch tests internally" -c ghfirst

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a revert job. Check the current status here.
Questions? Feedback? Please reach out to the PyTorch DevX Team

@pytorchmergebot
Copy link
Collaborator

@jerryzh168 your PR has been successfully reverted.

pytorchmergebot added a commit that referenced this pull request Jul 28, 2023
…support serialization (#105894)"

This reverts commit 3ca71ed.

Reverted #105894 on behalf of https://github.com/huydhn due to breaking executorch tests internally ([comment](#105894 (comment)))
PaliC added a commit that referenced this pull request Jul 28, 2023
…support serialization (#105894)"

This reverts commit 3ca71ed.

[ghstack-poisoned]
PaliC added a commit that referenced this pull request Jul 28, 2023
…support serialization (#105894)"

This reverts commit 3ca71ed.

ghstack-source-id: e55f2b4
Pull Request resolved: #106184
@leslie-fang-intel
Copy link
Collaborator

leslie-fang-intel commented Jul 28, 2023

Hi @jerryzh168, I think this PR has broken quantization inductor flow in this ghstack #105996. Can we have more discussion about the solution before re-landing of this PR? cc @jgong5 @Guobing-Chen

leslie-fang-intel pushed a commit to leslie-fang-intel/pytorch that referenced this pull request Jul 28, 2023
…serialization (pytorch#105894)

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
python test/test_quantization.py TestQuantizePT2E

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D47770963](https://our.internmc.facebook.com/intern/diff/D47770963)
Pull Request resolved: pytorch#105894
Approved by: https://github.com/kimishpatel
@jerryzh168
Copy link
Contributor Author

Hi @jerryzh168, I think this PR has broken quantization inductor flow in this ghstack #105996. Can we have more discussion about the solution before re-landing of this PR? cc @jgong5 @Guobing-Chen

sure, this changes quantize_per_tensor.default to quantize_per_tensor.tensor and that's pretty much it, is there anything else that's broken?

bobby-palmer pushed a commit to bobby-palmer/pytorch that referenced this pull request Jul 29, 2023
…support serialization (pytorch#105894)"

This reverts commit 3ca71ed.

Reverted pytorch#105894 on behalf of https://github.com/huydhn due to breaking executorch tests internally ([comment](pytorch#105894 (comment)))
leslie-fang-intel added a commit that referenced this pull request Jul 30, 2023
**Summary**
Draft the fix of QConv lowering in Inductor after PR #105894

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

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 1, 2023
…alar tensor"


**Summary**
Draft the fix of QConv lowering in Inductor after PR #105894

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

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 1, 2023
**Summary**
Cherry-pick #105894 for further testing.

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 1, 2023
**Summary**
Draft the fix of QConv lowering in Inductor after PR #105894

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

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 1, 2023
**Summary**
Cherry-pick #105894 for further testing.

[ghstack-poisoned]
@jerryzh168 jerryzh168 closed this Aug 2, 2023
jerryzh168 added a commit to jerryzh168/pytorch that referenced this pull request Aug 2, 2023
…support serialization (pytorch#105894)

Summary:
Currently scale/zero_point for per tensor quant is stored as burnt in literals, this means these values can't be serialized in state_dict, this
PR changes them to buffers/Tensors so that they can be serialized

Test Plan:
contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/3ca71ed735257cb7ad377b57a45057c265893a40

Test plan from GitHub:
python test/test_quantization.py TestQuantizePT2E

Original Phabricator Test Plan:
python test/test_quantization.py TestQuantizePT2E

Imported from OSS

Differential Revision: D47933210

fbshipit-source-id: 6c0993e58c5f8fd95c4d57b0fdb51e14a3573989
leslie-fang-intel added a commit that referenced this pull request Aug 3, 2023
**Summary**
Cherry-pick #105894 for further testing.

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 3, 2023
**Summary**
Cherry-pick #105894 for further testing.

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 3, 2023
…alar tensor"


**Summary**
Draft the fix of QConv lowering in Inductor after PR #105894

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

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 3, 2023
**Summary**
Draft the fix of QConv lowering in Inductor after PR #105894

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

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 3, 2023
…alar tensor"


**Summary**
Draft the fix of QConv lowering in Inductor after PR #105894

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

[ghstack-poisoned]
leslie-fang-intel added a commit that referenced this pull request Aug 3, 2023
**Summary**
Draft the fix of QConv lowering in Inductor after PR #105894

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

[ghstack-poisoned]
@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/894/head branch August 5, 2023 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged release notes: quantization release notes category Reverted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants