Skip to content

Conversation

@supriyar
Copy link
Contributor

@supriyar supriyar commented Feb 7, 2020

Stack from ghstack:

Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D19861927

Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
supriyar added a commit that referenced this pull request Feb 7, 2020
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: e6407ee
Pull Request resolved: #33080
@dr-ci
Copy link

dr-ci bot commented Feb 7, 2020

💊 CircleCI build failures summary and remediations

As of commit 12507a3:

Commit 12507a3 was recently pushed. Waiting for builds...


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 on the GitHub issue tracker.

This comment has been revised 14 times.

Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
supriyar added a commit that referenced this pull request Feb 7, 2020
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 777750b
Pull Request resolved: #33080
Copy link
Contributor

@raghuramank100 raghuramank100 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! A few requests:

Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
constexpr int kVLen = 8;
const int outer_size = N * HxW;
using Vec = Vec256<quint8>;
for (int i = 0; i < outer_size; ++i) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we might be able to simplify this further, since--correct me if i'm wrong--this is essentially just an elementwise access pattern where we broadcast alpha and beta to all [N, H, W]. It might be pretty simple to just use TensorIterator instead of handling the loop nest explicitly. I can elaborate a bit more later

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Blocked by #33166

@jamesr66a jamesr66a self-requested a review February 11, 2020 00:30
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
Copy link
Collaborator

@jamesr66a jamesr66a left a comment

Choose a reason for hiding this comment

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

LG, just one comment

Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
Summary:
Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Reviewers:

Subscribers:

Tasks:

Tags:

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

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

This pull request has been merged in d043560.

@facebook-github-bot facebook-github-bot deleted the gh/supriyar/54/head branch February 17, 2020 15:17
ttumiel pushed a commit to ttumiel/pytorch that referenced this pull request Mar 4, 2020
Summary:
Pull Request resolved: pytorch#33080

Quantized batch norm for cases where batch norm cannot be fused with conv.
AVX2 implementation is from Caffe2.

Test Plan:
python test/test_quantized.py TestQuantizedOps.test_batch_norm

Imported from OSS

Differential Revision: D19861927

fbshipit-source-id: bd8cd101fc063cb6358132ab7c651a160999293c
vkuzo added a commit that referenced this pull request Mar 24, 2020
Summary:

Adds a quantized implementation of LayerNorm for server.

Relevant PRs:
* #20345 (floating point LN)
* #33080 (quantized BN)

A future PR will add the Python wrapper.

Test Plan:

numerics match the floating point implementation
TODO: benchmarks

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 24, 2020
Summary:

Adds a quantized implementation of LayerNorm for server.

Relevant PRs:
* #20345 (floating point LN)
* #33080 (quantized BN)

A future PR will add the Python wrapper.

Test Plan:

numerics match the floating point implementation
TODO: benchmarks

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 24, 2020
Summary:

Adds a quantized implementation of LayerNorm for server.

Relevant PRs:
* #20345 (floating point LN)
* #33080 (quantized BN)

A future PR will add the Python wrapper.

Test Plan:

numerics match the floating point implementation
TODO: benchmarks

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Mar 24, 2020
Summary:

Adds a quantized implementation of LayerNorm for server.

Relevant PRs:
* #20345 (floating point LN)
* #33080 (quantized BN)

A future PR will add the Python wrapper.

Test Plan:

numerics match the floating point implementation
TODO: benchmarks

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 3c3721f
Pull Request resolved: #35329
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants