Skip to content

Add support to call unpack for pytorch mobile quantized FC and Conv#26211

Closed
supriyar wants to merge 15 commits intogh/supriyar/16/basefrom
gh/supriyar/16/head
Closed

Add support to call unpack for pytorch mobile quantized FC and Conv#26211
supriyar wants to merge 15 commits intogh/supriyar/16/basefrom
gh/supriyar/16/head

Conversation

@supriyar
Copy link
Copy Markdown
Contributor

@supriyar supriyar commented Sep 13, 2019

Stack from ghstack:

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D17464430

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:
supriyar added a commit that referenced this pull request Sep 13, 2019
Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: efdf239
Pull Request resolved: #26211
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:
supriyar added a commit that referenced this pull request Sep 15, 2019
Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: c823250
Pull Request resolved: #26211
Copy link
Copy Markdown
Collaborator

@dzhulgakov dzhulgakov 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, but please add a comment

Comment thread aten/src/ATen/native/quantized/cpu/qnnpack_utils.h
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:
supriyar added a commit that referenced this pull request Sep 16, 2019
Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 12d941f
Pull Request resolved: #26211
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… and Conv"

Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… and Conv"


Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
… and Conv"


Summary:
Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
zdevito pushed a commit to zdevito/ATen that referenced this pull request Sep 19, 2019
…#26211)

Summary:
Pull Request resolved: pytorch/pytorch#26211

Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Imported from OSS

Differential Revision: D17464430

fbshipit-source-id: 83ad5a2556dcf13245a1047feef6cfb489c9ef69
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in d46b982.

@facebook-github-bot facebook-github-bot deleted the gh/supriyar/16/head branch October 28, 2019 22:20
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
…ytorch#26211)

Summary:
Pull Request resolved: pytorch#26211

Currently QNNPACK does not have an unpack function like FBGEMM does.
In order to be able to script quantized models for mobile, we need to save unpacked weights.

This change stores the original weights and bias in the opaque struct and simply returns it when unpack is called

Test Plan:
python test/test_quantized.py TestQNNPackOps.test_qconv_unpack
python test/test_quantized.py TestQNNPackOps.test_qlinear_unpack

Imported from OSS

Differential Revision: D17464430

fbshipit-source-id: 83ad5a2556dcf13245a1047feef6cfb489c9ef69
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Merged oncall: quantization Quantization support in PyTorch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants