Skip to content

Conversation

@supriyar
Copy link
Contributor

@supriyar supriyar commented Aug 7, 2020

Stack from ghstack:

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: D23070632

…sor.

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@dr-ci
Copy link

dr-ci bot commented Aug 7, 2020

💊 CI failures summary and remediations

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


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

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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group.

See how this bot performed.

This comment has been revised 53 times.

@supriyar supriyar requested a review from jerryzh168 August 7, 2020 23:07
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
supriyar added a commit that referenced this pull request Aug 7, 2020
…sor.

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: b26323b
Pull Request resolved: #42762
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
supriyar added a commit that referenced this pull request Aug 10, 2020
…sor.

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 05ffb75
Pull Request resolved: #42762
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
// TODO: Extend this to support 4-bits once 4-bit qtensor support is added.
Tensor qembeddingbag_prepack(at::Tensor qweight) {
Tensor weight_contig = qweight.contiguous(qweight.suggest_memory_format());
const uint8_t* weight_data =
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to check the dtype here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, I can add a check. We don't check dtype in many ops though, probably because data_ptr would error out for incorrect type

Copy link
Contributor

@jerryzh168 jerryzh168 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

…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

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

[ghstack-poisoned]
…antized tensor."

Summary:
Use a prepack function that accepts qtensor as an input. The output is a byte tensor with packed data.
This is currently implemented only for 8-bit. In the future once we add 4-bit support this function will be extended to support that too.

Note -In the following change I will add TorchBind support for this to support serialization of packed weights.

Test Plan:
python test/test_quantization.py TestQuantizedEmbeddingBag

Reviewers:

Subscribers:

Tasks:

Tags:

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

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

This pull request has been merged in 7632a9b.

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 7632a9b.

@facebook-github-bot facebook-github-bot deleted the gh/supriyar/157/head branch August 18, 2020 14:17
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.

5 participants