Migrate exp and exp_ from the TH to Aten (CUDA) #36652
Migrate exp and exp_ from the TH to Aten (CUDA) #36652kshitij12345 wants to merge 5 commits intopytorch:masterfrom
exp and exp_ from the TH to Aten (CUDA) #36652Conversation
|
@VitalyFedyunin @ifedan @xuhdev Please review. |
💊 CI failures summary and remediationsAs of commit a5a29be (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis 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. This comment has been revised 34 times. |
|
@pytorchbot retest this please |
13c447e to
ab045be
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
@VitalyFedyunin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
can we not merge this until #37582 merges? Thanks! |
|
Sure. Will rebase once #37582 is in. |
ab045be to
ec0df58
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
@VitalyFedyunin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@VitalyFedyunin Gentle ping for reminder :) |
|
@kshitij12345 I think you should rebase? Since @VitalyFedyunin has approved, the bot will do the merge for you. |
|
@cloudhan Thanks will do that. |
…24561 Benchmark with same build settings on same system. gcc : version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) CUDA : 10.1 GPU : 1050ti ```python import timeit for n, t in [(10_000, 20000), (100_000, 20000)]: for dtype in ('torch.half', 'torch.float', 'torch.double'): print(f'torch.exp(a) a.numel() == {n} for {t} times {dtype}') print(timeit.timeit(f'torch.exp(a); torch.cuda.synchronize()', setup=f'import torch; a=torch.arange({n}, dtype={dtype}, device="cuda")', number=t)) ``` Before: ``` torch.exp(a) a.numel() == 10000 for 20000 times torch.half 0.3001665159999902 torch.exp(a) a.numel() == 10000 for 20000 times torch.float 0.28265794499998265 torch.exp(a) a.numel() == 10000 for 20000 times torch.double 0.3432170909998149 torch.exp(a) a.numel() == 100000 for 20000 times torch.half 0.32273333800003456 torch.exp(a) a.numel() == 100000 for 20000 times torch.float 0.31498759600003723 torch.exp(a) a.numel() == 100000 for 20000 times torch.double 1.079708754999956 ``` After: ``` torch.exp(a) a.numel() == 10000 for 20000 times torch.half 0.27996097300092515 torch.exp(a) a.numel() == 10000 for 20000 times torch.float 0.2774473429999489 torch.exp(a) a.numel() == 10000 for 20000 times torch.double 0.33066844799941464 torch.exp(a) a.numel() == 100000 for 20000 times torch.half 0.27641824200145493 torch.exp(a) a.numel() == 100000 for 20000 times torch.float 0.27805968599932385 torch.exp(a) a.numel() == 100000 for 20000 times torch.double 1.0644143180015817 ```
ec0df58 to
a5a29be
Compare
facebook-github-bot
left a comment
There was a problem hiding this comment.
@VitalyFedyunin has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
@VitalyFedyunin merged this pull request in d86de91. |
Summary: Closes pytorch#24561 Benchmark with same build settings on same system. gcc : version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04) CUDA : 10.1 GPU : 1050ti ```python import timeit for n, t in [(10_000, 20000), (100_000, 20000)]: for dtype in ('torch.half', 'torch.float', 'torch.double'): print(f'torch.exp(a) a.numel() == {n} for {t} times {dtype}') print(timeit.timeit(f'torch.exp(a); torch.cuda.synchronize()', setup=f'import torch; a=torch.arange({n}, dtype={dtype}, device="cuda")', number=t)) ``` Before: ``` torch.exp(a) a.numel() == 10000 for 20000 times torch.half 0.3001665159999902 torch.exp(a) a.numel() == 10000 for 20000 times torch.float 0.28265794499998265 torch.exp(a) a.numel() == 10000 for 20000 times torch.double 0.3432170909998149 torch.exp(a) a.numel() == 100000 for 20000 times torch.half 0.32273333800003456 torch.exp(a) a.numel() == 100000 for 20000 times torch.float 0.31498759600003723 torch.exp(a) a.numel() == 100000 for 20000 times torch.double 1.079708754999956 ``` After: ``` torch.exp(a) a.numel() == 10000 for 20000 times torch.half 0.27996097300092515 torch.exp(a) a.numel() == 10000 for 20000 times torch.float 0.2774473429999489 torch.exp(a) a.numel() == 10000 for 20000 times torch.double 0.33066844799941464 torch.exp(a) a.numel() == 100000 for 20000 times torch.half 0.27641824200145493 torch.exp(a) a.numel() == 100000 for 20000 times torch.float 0.27805968599932385 torch.exp(a) a.numel() == 100000 for 20000 times torch.double 1.0644143180015817 ``` Pull Request resolved: pytorch#36652 Differential Revision: D21164653 Pulled By: VitalyFedyunin fbshipit-source-id: 42c7b24b0d85ff1d390231f1457968a8869b8db3
Closes #24561
Benchmark with same build settings on same system.
gcc : version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)
CUDA : 10.1
GPU : 1050ti
Before:
After: