Skip to content

Conversation

@jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Mar 23, 2022

Stack from ghstack (oldest at bottom):

Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps
python test/test_quantization.py TestFXNumericSuiteCoreAPIs
python test/test_quantization.py TestFXGraphMatcher

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D35071437

Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Mar 23, 2022

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 007eb11 (more details on the Dr. CI page):


  • 4/4 failures introduced in this PR

🕵️ 3 new failures recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See GitHub Actions build pull / linux-xenial-py3.7-gcc5.4 / test (docs_test, 1, 1, linux.2xlarge) (1/3)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-03-24T19:31:51.3295900Z ImportError: canno...da/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T19:31:51.3292445Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/cmd/build.py", line 25, in <module>
2022-03-24T19:31:51.3292742Z     from sphinx.application import Sphinx
2022-03-24T19:31:51.3293114Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/application.py", line 43, in <module>
2022-03-24T19:31:51.3293419Z     from sphinx.registry import SphinxComponentRegistry
2022-03-24T19:31:51.3293802Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/registry.py", line 24, in <module>
2022-03-24T19:31:51.3294074Z     from sphinx.builders import Builder
2022-03-24T19:31:51.3294444Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 26, in <module>
2022-03-24T19:31:51.3294778Z     from sphinx.util import import_object, logging, progress_message, rst, status_iterator
2022-03-24T19:31:51.3295180Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/util/rst.py", line 21, in <module>
2022-03-24T19:31:51.3295474Z     from jinja2 import Environment, environmentfilter
2022-03-24T19:31:51.3295900Z ImportError: cannot import name 'environmentfilter' from 'jinja2' (/opt/conda/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T19:31:51.3580869Z Makefile:38: recipe for target 'doctest' failed
2022-03-24T19:31:51.3581188Z make: *** [doctest] Error 1
2022-03-24T19:31:51.3581843Z + cleanup
2022-03-24T19:31:51.3582064Z + retcode=2
2022-03-24T19:31:51.3582361Z + set +x
2022-03-24T19:31:51.3585284Z + cleanup
2022-03-24T19:31:51.3585499Z + retcode=2
2022-03-24T19:31:51.3585755Z + set +x
2022-03-24T19:31:51.3627727Z ##[error]Process completed with exit code 2.
2022-03-24T19:31:51.3662511Z ##[group]Run pytorch/pytorch/.github/actions/chown-workspace@master

See GitHub Actions build pull / win-vs2019-cuda11.3-py3 / test (default, 1, 2, windows.8xlarge.nvidia.gpu) (2/3)

Step: "Test" (full log | diagnosis details | 🔁 rerun)

2022-03-24T22:24:00.9771434Z RuntimeError: test_torch failed!
2022-03-24T22:23:46.6762666Z Generated XML report: test-reports\python-unittest\test_torch\TEST-TestVitalSignsCudaCUDA-20220324221417.xml
2022-03-24T22:23:46.6764557Z Generated XML report: test-reports\python-unittest\test_torch\TEST-TestVitalSignsCudaCPU-20220324221417.xml
2022-03-24T22:24:00.4197010Z [TORCH_VITAL] CUDA.used		 true
2022-03-24T22:24:00.4197808Z [TORCH_VITAL] Dataloader.basic_unit_test		 TEST_VALUE_STRING
2022-03-24T22:24:00.4198635Z [TORCH_VITAL] Dataloader.enabled		 True
2022-03-24T22:24:00.9750760Z Traceback (most recent call last):
2022-03-24T22:24:00.9752044Z   File "run_test.py", line 1054, in <module>
2022-03-24T22:24:00.9752593Z     main()
2022-03-24T22:24:00.9753272Z   File "run_test.py", line 1032, in main
2022-03-24T22:24:00.9770768Z     raise RuntimeError(err_message)
2022-03-24T22:24:00.9771434Z RuntimeError: test_torch failed!
2022-03-24T22:24:03.7102856Z 
2022-03-24T22:24:03.7120974Z (base) C:\actions-runner\_work\pytorch\pytorch\test>if ERRORLEVEL 1 goto fail 
2022-03-24T22:24:03.7138570Z 
2022-03-24T22:24:03.7139366Z (base) C:\actions-runner\_work\pytorch\pytorch\test>exit /b 1 
2022-03-24T22:24:03.8911507Z + cleanup
2022-03-24T22:24:03.8922094Z + retcode=1
2022-03-24T22:24:03.8922560Z + set +x
2022-03-24T22:24:03.9875178Z ##[error]Process completed with exit code 1.
2022-03-24T22:24:04.7882898Z ##[group]Run pytorch/pytorch/.github/actions/upload-test-artifacts@master
2022-03-24T22:24:04.7883745Z with:

See GitHub Actions build pull / linux-docs / build-docs (python) (3/3)

Step: "Build python docs" (full log | diagnosis details | 🔁 rerun)

2022-03-24T19:31:16.6945825Z ImportError: canno...da/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T19:31:16.6942281Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/cmd/build.py", line 25, in <module>
2022-03-24T19:31:16.6942569Z     from sphinx.application import Sphinx
2022-03-24T19:31:16.6942951Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/application.py", line 43, in <module>
2022-03-24T19:31:16.6943275Z     from sphinx.registry import SphinxComponentRegistry
2022-03-24T19:31:16.6943653Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/registry.py", line 24, in <module>
2022-03-24T19:31:16.6943957Z     from sphinx.builders import Builder
2022-03-24T19:31:16.6944331Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/builders/__init__.py", line 26, in <module>
2022-03-24T19:31:16.6944689Z     from sphinx.util import import_object, logging, progress_message, rst, status_iterator
2022-03-24T19:31:16.6945082Z   File "/opt/conda/lib/python3.7/site-packages/sphinx/util/rst.py", line 21, in <module>
2022-03-24T19:31:16.6945380Z     from jinja2 import Environment, environmentfilter
2022-03-24T19:31:16.6945825Z ImportError: cannot import name 'environmentfilter' from 'jinja2' (/opt/conda/lib/python3.7/site-packages/jinja2/__init__.py)
2022-03-24T19:31:16.7222502Z Makefile:38: recipe for target 'html' failed
2022-03-24T19:31:16.7222899Z make[1]: *** [html] Error 1
2022-03-24T19:31:16.7223238Z make[1]: Leaving directory '/var/lib/jenkins/workspace/docs'
2022-03-24T19:31:16.7223572Z Makefile:27: recipe for target 'html-stable' failed
2022-03-24T19:31:16.7223966Z make: *** [html-stable] Error 2
2022-03-24T19:31:16.7225914Z ++ code=2
2022-03-24T19:31:16.7226415Z ++ '[' 2 -ne 0 ']'
2022-03-24T19:31:16.7226615Z ++ set +x
2022-03-24T19:31:16.7226781Z =========================
2022-03-24T19:31:16.7235806Z =========================

1 failure not recognized by patterns:

Job Step Action
GitHub Actions pull / linux-docs / build-docs (cpp) Unknown 🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@jerryzh168
Copy link
Contributor Author

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

… config"

Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@jerryzh168
Copy link
Contributor Author

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

@jerryzh168 jerryzh168 requested review from andrewor14 and vkuzo March 23, 2022 06:46
… config"

Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… config"

Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… config"

Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
_op_in_base_sets_of_related_ops(base_op),
f"{base_op} not in sets of related ops")
else:
elif not _op_in_base_sets_of_related_ops(base_op):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@vkuzo this is the change I made to the test, please take a look

Copy link
Contributor Author

Choose a reason for hiding this comment

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

basically we don't explicitly check the quantize handler type in this branch, but just directly check if op is in the related ops set

… config"

Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… config"

Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@jerryzh168
Copy link
Contributor Author

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

… config"


Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps
python test/test_quantization.py TestFXNumericSuiteCoreAPIs
python test/test_quantization.py TestFXGraphMatcher

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… config"


Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps
python test/test_quantization.py TestFXNumericSuiteCoreAPIs
python test/test_quantization.py TestFXGraphMatcher

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@jerryzh168
Copy link
Contributor Author

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

… config"


Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps
python test/test_quantization.py TestFXNumericSuiteCoreAPIs
python test/test_quantization.py TestFXGraphMatcher

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@jerryzh168
Copy link
Contributor Author

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

… config"


Summary:
Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps
python test/test_quantization.py TestFXNumericSuiteCoreAPIs
python test/test_quantization.py TestFXGraphMatcher

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
@jerryzh168
Copy link
Contributor Author

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

facebook-github-bot pushed a commit that referenced this pull request Mar 25, 2022
…4600)

Summary:
Pull Request resolved: #74600

Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Imported from OSS

Reviewed By: andrewor14

Differential Revision: D35071437

fbshipit-source-id: 70351d2810ca1ac7dc09d4a9c239f6757ccb51ca
@github-actions
Copy link
Contributor

Hey @jerryzh168.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@jerryzh168 jerryzh168 added the topic: not user facing topic category label Mar 25, 2022
shahofblah pushed a commit that referenced this pull request Mar 25, 2022
…4600)

Summary:
Pull Request resolved: #74600

Following #74210, this PR adds the support for some ops
using the DefaultNodeQuantizeHandler in the backend_config_dict defintion for pytorch native backend

TODO: There is still a few ops we didn't handle with backend_config_dict path: gelu and softmax, need to discuss if we still need them, if so we can change the test
to use backend_config_dict and remove the DefaultNodeQuantizeHandler after that

Test Plan:
python test/test_quantization.py TestQuantizeFxOps

Imported from OSS

Reviewed By: andrewor14

Differential Revision: D35071437

fbshipit-source-id: 70351d2810ca1ac7dc09d4a9c239f6757ccb51ca
(cherry picked from commit 5e68f75)
@facebook-github-bot facebook-github-bot deleted the gh/jerryzh168/754/head branch March 28, 2022 14:17
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.

5 participants