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

do not call permute on empty tensor #3705

Closed
wants to merge 1 commit into from

Conversation

sarckk
Copy link
Member

@sarckk sarckk commented Feb 18, 2025

Summary:
short circuit if pooled embedding(s) is empty, otherwise we run into invalid CUDA kernel launch args

this change is necessary to support zero batch size KeyedJaggedTensor embedding lookups

conceptually, we cannot permute an empty tensor (i.e. tensor.numel()==0) so return the empty tensor

Reviewed By: sryap

Differential Revision: D69635568

@facebook-github-bot
Copy link
Contributor

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

Copy link

netlify bot commented Feb 18, 2025

Deploy Preview for pytorch-fbgemm-docs ready!

Name Link
🔨 Latest commit 549ef94
🔍 Latest deploy log https://app.netlify.com/sites/pytorch-fbgemm-docs/deploys/67b4f55fd925ff0008dc13d1
😎 Deploy Preview https://deploy-preview-3705--pytorch-fbgemm-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Summary:
X-link: facebookresearch/FBGEMM#787


short circuit if pooled embedding(s) is empty, otherwise we run into invalid CUDA kernel launch args

this change is necessary to support zero batch size KeyedJaggedTensor embedding lookups

conceptually, we cannot permute an empty tensor (i.e. `tensor.numel()==0`) so return the empty tensor

Reviewed By: sryap

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

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

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 95099a6.

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.

2 participants