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

[quant] Support 2 dim input in quantized batchnorm 1d #51597

Closed
wants to merge 1 commit into from

Conversation

jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Feb 2, 2021

Stack from ghstack:

Summary:
aliging quantized batchnorm behavior with fp batchnorm

Test Plan:
python test/test_quantization.py TestQuantizedOps.test_batch_norm
python test/test_quantization.py TestQuantizedOps.test_batch_norm_relu

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D26212489

Summary:
aliging quantized batchnorm behavior with fp batchnorm

Test Plan:
python test/test_quantization.py TestQuantizedOps.test_batch_norm
python test/test_quantization.py TestQuantizedOps.test_batch_norm_relu

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
jerryzh168 added a commit that referenced this pull request Feb 2, 2021
Summary:
aliging quantized batchnorm behavior with fp batchnorm

Test Plan:
python test/test_quantization.py TestQuantizedOps.test_batch_norm
python test/test_quantization.py TestQuantizedOps.test_batch_norm_relu

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 85cb7f98979587d1ea3dda4223ab0b8e94d7c06a
Pull Request resolved: #51597
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 2, 2021

💊 CI failures summary and remediations

As of commit 0309da1 (more details on the Dr. CI page):


  • 2/2 failures possibly* introduced in this PR
    • 1/2 non-CircleCI failure(s)

🕵️ 1 new failure recognized by patterns

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

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_test (1/1)

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

Feb 03 01:02:41 [E request_callback_no_python.cpp:653] Received error while processing request type 258: RuntimeError: Can not pickle torch.futures.Future
Feb 03 01:02:41 At:
Feb 03 01:02:41   /opt/conda/lib/python3.6/site-packages/torch/distributed/rpc/internal.py(120): serialize
Feb 03 01:02:41   /opt/conda/lib/python3.6/site-packages/torch/distributed/rpc/internal.py(172): serialize
Feb 03 01:02:41 
Feb 03 01:02:41 [E request_callback_no_python.cpp:653] Received error while processing request type 258: RuntimeError: Can not pickle torch.futures.Future
Feb 03 01:02:41 
Feb 03 01:02:41 At:
Feb 03 01:02:41   /opt/conda/lib/python3.6/site-packages/torch/distributed/rpc/internal.py(120): serialize
Feb 03 01:02:41   /opt/conda/lib/python3.6/site-packages/torch/distributed/rpc/internal.py(172): serialize
Feb 03 01:02:41 
Feb 03 01:02:41 [E request_callback_no_python.cpp:653] Received error while processing request type 258: RuntimeError: Can not pickle torch.futures.Future
Feb 03 01:02:41 
Feb 03 01:02:41 At:
Feb 03 01:02:41   /opt/conda/lib/python3.6/site-packages/torch/distributed/rpc/internal.py(120): serialize
Feb 03 01:02:41   /opt/conda/lib/python3.6/site-packages/torch/distributed/rpc/internal.py(172): serialize
Feb 03 01:02:41 
Feb 03 01:02:41 ok (1.942s)
Feb 03 01:02:43   test_return_future_remote (__main__.ProcessGroupRpcTestWithSpawn) ... RPC was initialized with the PROCESS_GROUP backend which is deprecated and slated to be removed and superseded by the TENSORPIPE backend. It is recommended to migrate to the TENSORPIPE backend.
Feb 03 01:02:43 RPC was initialized with the PROCESS_GROUP backend which is deprecated and slated to be removed and superseded by the TENSORPIPE backend. It is recommended to migrate to the TENSORPIPE backend.
Feb 03 01:02:43 RPC was initialized with the PROCESS_GROUP backend which is deprecated and slated to be removed and superseded by the TENSORPIPE backend. It is recommended to migrate to the TENSORPIPE backend.
Feb 03 01:02:43 RPC was initialized with the PROCESS_GROUP backend which is deprecated and slated to be removed and superseded by the TENSORPIPE backend. It is recommended to migrate to the TENSORPIPE backend.

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

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

@jerryzh168 jerryzh168 requested a review from vkuzo February 3, 2021 19:15
Copy link
Contributor

@vkuzo vkuzo left a comment

Choose a reason for hiding this comment

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

looks good, thank you! Did we check that this is the same behavior as fp32 for dim==2? I don't think that needs to be in the unit tests, just confirming as I haven't actually looked into the fp32 op implementation for this issue.

@jerryzh168
Copy link
Contributor Author

looks good, thank you! Did we check that this is the same behavior as fp32 for dim==2? I don't think that needs to be in the unit tests, just confirming as I haven't actually looked into the fp32 op implementation for this issue.

yeah we have tests for both quantized batchnorm and batchnorm_relu that matches the reference implementation with dequant - float batchnorm - quant

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in d8742ee.

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

3 participants