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

Add support for duplicate in permutations for permute_pooled_embs_split #1940

Closed
wants to merge 1 commit into from

Conversation

AGZain
Copy link
Contributor

@AGZain AGZain commented Aug 15, 2023

Summary:
This diff builds ontop of the pervious diffs and adds support for duplicates to the permute_pooled_embs_split op.

Background
Currently permute_pooled_embs_split does not support duplicates in a permutation, this poses a problem with passing the same embeddings to multiple modules. This doc proposes a solution to allow duplicate subsets in the resultant permutation.
Details
The required implementation of permute_pooled_embs_split should support a subset being repeated. This is represented by having duplicates in the permute list. This also results in the output list size being greater than the input list.
Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Offset_dims: [0, 2, 5, 6, 10]
Permute: [3, 0, 2, 1, 3]
Output: [6, 7, 8, 9, 0, 1, 5, 2, 3, 4, 6, 7, 8, 9]

Differential Revision: D48305847

@netlify
Copy link

netlify bot commented Aug 15, 2023

Deploy Preview for pytorch-fbgemm-docs canceled.

Name Link
🔨 Latest commit 886e065
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/6508a7f766a4ec0008079560

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48305847

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48305847

AGZain added a commit to AGZain/FBGEMM that referenced this pull request Aug 16, 2023
…it (pytorch#1940)

Summary:
Pull Request resolved: pytorch#1940

This diff builds ontop of the pervious diffs and adds support for duplicates to the permute_pooled_embs_split op.

Background
Currently permute_pooled_embs_split does not support duplicates in a permutation, this poses a problem with passing the same embeddings to multiple modules. This doc proposes a solution to allow duplicate subsets in the resultant permutation.
Details
The required implementation of permute_pooled_embs_split should support a subset being repeated. This is represented by having duplicates in the permute list. This also results in the output list size being greater than the input list.
Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Offset_dims: [0,  2,  5,  6, 10]
Permute: [3, 0, 2, 1, 3]
Output:  [6, 7, 8, 9, 0, 1, 5, 2, 3, 4, 6, 7, 8, 9]

Differential Revision: D48305847

fbshipit-source-id: 39c34e6f8533e49e5b0ad1847e77750f826f8569
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48305847

AGZain added a commit to AGZain/FBGEMM that referenced this pull request Aug 16, 2023
…it (pytorch#1940)

Summary:
Pull Request resolved: pytorch#1940

This diff builds ontop of the pervious diffs and adds support for duplicates to the permute_pooled_embs_split op.

Background
Currently permute_pooled_embs_split does not support duplicates in a permutation, this poses a problem with passing the same embeddings to multiple modules. This doc proposes a solution to allow duplicate subsets in the resultant permutation.
Details
The required implementation of permute_pooled_embs_split should support a subset being repeated. This is represented by having duplicates in the permute list. This also results in the output list size being greater than the input list.
Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Offset_dims: [0,  2,  5,  6, 10]
Permute: [3, 0, 2, 1, 3]
Output:  [6, 7, 8, 9, 0, 1, 5, 2, 3, 4, 6, 7, 8, 9]

Differential Revision: D48305847

fbshipit-source-id: 974bd1b76f29485974677f82754803e351f2e1c8
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48305847

AGZain added a commit to AGZain/FBGEMM that referenced this pull request Aug 18, 2023
…it (pytorch#1940)

Summary:
Pull Request resolved: pytorch#1940

This diff builds ontop of the pervious diffs and adds support for duplicates to the permute_pooled_embs_split op.

Background
Currently permute_pooled_embs_split does not support duplicates in a permutation, this poses a problem with passing the same embeddings to multiple modules. This doc proposes a solution to allow duplicate subsets in the resultant permutation.
Details
The required implementation of permute_pooled_embs_split should support a subset being repeated. This is represented by having duplicates in the permute list. This also results in the output list size being greater than the input list.
Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Offset_dims: [0,  2,  5,  6, 10]
Permute: [3, 0, 2, 1, 3]
Output:  [6, 7, 8, 9, 0, 1, 5, 2, 3, 4, 6, 7, 8, 9]

Differential Revision: D48305847

fbshipit-source-id: d3776869860ca4254a69bd7079061e737e2c0857
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48305847

AGZain added a commit to AGZain/FBGEMM that referenced this pull request Aug 18, 2023
…it (pytorch#1940)

Summary:
Pull Request resolved: pytorch#1940

This diff builds ontop of the pervious diffs and adds support for duplicates to the permute_pooled_embs_split op.

Background
Currently permute_pooled_embs_split does not support duplicates in a permutation, this poses a problem with passing the same embeddings to multiple modules. This doc proposes a solution to allow duplicate subsets in the resultant permutation.
Details
The required implementation of permute_pooled_embs_split should support a subset being repeated. This is represented by having duplicates in the permute list. This also results in the output list size being greater than the input list.
Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Offset_dims: [0,  2,  5,  6, 10]
Permute: [3, 0, 2, 1, 3]
Output:  [6, 7, 8, 9, 0, 1, 5, 2, 3, 4, 6, 7, 8, 9]

Differential Revision: D48305847

fbshipit-source-id: 39b3eaea63a1b4efd2c392425586f10fe2d0c6fa
…it (pytorch#1940)

Summary:

This diff builds ontop of the pervious diffs and adds support for duplicates to the permute_pooled_embs_split op.

Background
Currently permute_pooled_embs_split does not support duplicates in a permutation, this poses a problem with passing the same embeddings to multiple modules. This doc proposes a solution to allow duplicate subsets in the resultant permutation.
Details
The required implementation of permute_pooled_embs_split should support a subset being repeated. This is represented by having duplicates in the permute list. This also results in the output list size being greater than the input list.
Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Offset_dims: [0,  2,  5,  6, 10]
Permute: [3, 0, 2, 1, 3]
Output:  [6, 7, 8, 9, 0, 1, 5, 2, 3, 4, 6, 7, 8, 9]

Reviewed By: sryap

Differential Revision: D48305847
AGZain pushed a commit to AGZain/FBGEMM that referenced this pull request Sep 18, 2023
…it (pytorch#1940)

Summary:

This diff builds ontop of the pervious diffs and adds support for duplicates to the permute_pooled_embs_split op.

Background
Currently permute_pooled_embs_split does not support duplicates in a permutation, this poses a problem with passing the same embeddings to multiple modules. This doc proposes a solution to allow duplicate subsets in the resultant permutation.
Details
The required implementation of permute_pooled_embs_split should support a subset being repeated. This is represented by having duplicates in the permute list. This also results in the output list size being greater than the input list.
Input: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
Offset_dims: [0,  2,  5,  6, 10]
Permute: [3, 0, 2, 1, 3]
Output:  [6, 7, 8, 9, 0, 1, 5, 2, 3, 4, 6, 7, 8, 9]

Reviewed By: sryap

Differential Revision: D48305847
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48305847

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48305847

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f030bbc.

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

2 participants