Skip to content

[pt1] Use the EmbeddingLookupIdx API which takes the offsets instead of lengths #24945

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

Closed
wants to merge 7 commits into from

Conversation

jianyuh
Copy link
Member

@jianyuh jianyuh commented Aug 21, 2019

Stack from ghstack:

As Title says.

Differential Revision: D16930519

jianyuh added a commit that referenced this pull request Aug 21, 2019
…of lengths

As Title says.

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

ghstack-source-id: 88688199
Pull Request resolved: #24945
jianyuh added a commit that referenced this pull request Aug 21, 2019
…lengths

Pull Request resolved: #24945

As Title says.
ghstack-source-id: 88699061

Differential Revision: [D16930519](https://our.internmc.facebook.com/intern/diff/D16930519/)
jianyuh added a commit that referenced this pull request Aug 22, 2019
…lengths

Pull Request resolved: #24945

As Title says.
ghstack-source-id: 88778883

Differential Revision: [D16930519](https://our.internmc.facebook.com/intern/diff/D16930519/)
jianyuh added a commit that referenced this pull request Aug 23, 2019
…lengths

Pull Request resolved: #24945

As Title says.
ghstack-source-id: 88884366

Differential Revision: [D16930519](https://our.internmc.facebook.com/intern/diff/D16930519/)
jianyuh added a commit that referenced this pull request Aug 23, 2019
…lengths

Pull Request resolved: #24945

As Title says.
ghstack-source-id: 88903516

Differential Revision: [D16930519](https://our.internmc.facebook.com/intern/diff/D16930519/)
@zou3519 zou3519 deleted the gh/jianyuh/14/head branch August 24, 2019 00:16
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 363655d.

zdevito pushed a commit to zdevito/ATen that referenced this pull request Aug 24, 2019
…s (#24945)

Summary:
Pull Request resolved: pytorch/pytorch#24945

As Title says.
ghstack-source-id: 88903516

Test Plan:
To Check with CI.

```
import torch, time

eb = torch.nn.EmbeddingBag(1000000, 64, mode='sum')

input = torch.LongTensor(1500).random_(0, 1000000)
offsets = torch.zeros(64, dtype=torch.int64)

niter = 10000
s = time.time()
for i in range(niter):
    out = eb(input, offsets)
time_per_iter = (time.time() - s) / niter
print('time_per_iter', time_per_iter)
print('GB/s', (input.numel() * 64 * 4 + out.numel() * 4) / time_per_iter / 1e9)
```

Reviewed By: bddppq

Differential Revision: D16930519

fbshipit-source-id: 44d59ca2588deecde1adb096673fc100bcd9bc46
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.

4 participants