-
Notifications
You must be signed in to change notification settings - Fork 25.5k
Migrate sinh
and sinh_
from the TH to Aten (CUDA)
#28527
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
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Benchmark (Debian Buster, CUDA 9.2, Quadro P400, turbo off, Release): ```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.sinh(a) a.numel() == {n} for {t} times {dtype}') print(timeit.timeit(f'torch.sinh(a); torch.cuda.synchronize()', setup=f'import torch; a=torch.arange({n}, dtype={dtype}, device="cuda")', number=t)) ``` Before: ``` torch.sinh(a) a.numel() == 10000 for 20000 times torch.half 0.3807680979998622 torch.sinh(a) a.numel() == 10000 for 20000 times torch.float 0.37430476099962107 torch.sinh(a) a.numel() == 10000 for 20000 times torch.double 1.0580407639999976 torch.sinh(a) a.numel() == 100000 for 20000 times torch.half 0.7996397469996737 torch.sinh(a) a.numel() == 100000 for 20000 times torch.float 1.010930432999885 torch.sinh(a) a.numel() == 100000 for 20000 times torch.double 7.310400856999877 ``` After: ``` torch.sinh(a) a.numel() == 10000 for 20000 times torch.half 0.3720399889998589 torch.sinh(a) a.numel() == 10000 for 20000 times torch.float 0.3694016069994177 torch.sinh(a) a.numel() == 10000 for 20000 times torch.double 1.0551542660004998 torch.sinh(a) a.numel() == 100000 for 20000 times torch.half 0.7431191599998783 torch.sinh(a) a.numel() == 100000 for 20000 times torch.float 0.9953043630002867 torch.sinh(a) a.numel() == 100000 for 20000 times torch.double 7.3146168890007175 ``` Close #24628 [ghstack-poisoned]
This was referenced Oct 23, 2019
xuhdev
added a commit
that referenced
this pull request
Oct 23, 2019
Benchmark (Debian Buster, CUDA 9.2, Quadro P400, turbo off, Release): ```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.sinh(a) a.numel() == {n} for {t} times {dtype}') print(timeit.timeit(f'torch.sinh(a); torch.cuda.synchronize()', setup=f'import torch; a=torch.arange({n}, dtype={dtype}, device="cuda")', number=t)) ``` Before: ``` torch.sinh(a) a.numel() == 10000 for 20000 times torch.half 0.3807680979998622 torch.sinh(a) a.numel() == 10000 for 20000 times torch.float 0.37430476099962107 torch.sinh(a) a.numel() == 10000 for 20000 times torch.double 1.0580407639999976 torch.sinh(a) a.numel() == 100000 for 20000 times torch.half 0.7996397469996737 torch.sinh(a) a.numel() == 100000 for 20000 times torch.float 1.010930432999885 torch.sinh(a) a.numel() == 100000 for 20000 times torch.double 7.310400856999877 ``` After: ``` torch.sinh(a) a.numel() == 10000 for 20000 times torch.half 0.3720399889998589 torch.sinh(a) a.numel() == 10000 for 20000 times torch.float 0.3694016069994177 torch.sinh(a) a.numel() == 10000 for 20000 times torch.double 1.0551542660004998 torch.sinh(a) a.numel() == 100000 for 20000 times torch.half 0.7431191599998783 torch.sinh(a) a.numel() == 100000 for 20000 times torch.float 0.9953043630002867 torch.sinh(a) a.numel() == 100000 for 20000 times torch.double 7.3146168890007175 ``` Close #24628 ghstack-source-id: 501674a Pull Request resolved: #28527
ifedan
approved these changes
Oct 24, 2019
VitalyFedyunin
approved these changes
Oct 24, 2019
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Oct 30, 2019
Summary: Pull Request resolved: pytorch/pytorch#28527 Benchmark (Debian Buster, CUDA 9.2, Quadro P400, turbo off, Release, gcc 7.4): ```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.sinh(a) a.numel() == {n} for {t} times {dtype}') print(timeit.timeit(f'torch.sinh(a); torch.cuda.synchronize()', setup=f'import torch; a=torch.arange({n}, dtype={dtype}, device="cuda")', number=t)) ``` Before: ``` torch.sinh(a) a.numel() == 10000 for 20000 times torch.half 0.3807680979998622 torch.sinh(a) a.numel() == 10000 for 20000 times torch.float 0.37430476099962107 torch.sinh(a) a.numel() == 10000 for 20000 times torch.double 1.0580407639999976 torch.sinh(a) a.numel() == 100000 for 20000 times torch.half 0.7996397469996737 torch.sinh(a) a.numel() == 100000 for 20000 times torch.float 1.010930432999885 torch.sinh(a) a.numel() == 100000 for 20000 times torch.double 7.310400856999877 ``` After: ``` torch.sinh(a) a.numel() == 10000 for 20000 times torch.half 0.3720399889998589 torch.sinh(a) a.numel() == 10000 for 20000 times torch.float 0.3694016069994177 torch.sinh(a) a.numel() == 10000 for 20000 times torch.double 1.0551542660004998 torch.sinh(a) a.numel() == 100000 for 20000 times torch.half 0.7431191599998783 torch.sinh(a) a.numel() == 100000 for 20000 times torch.float 0.9953043630002867 torch.sinh(a) a.numel() == 100000 for 20000 times torch.double 7.3146168890007175 ``` Close #24628 Test Plan: Imported from OSS Differential Revision: D18124732 Pulled By: VitalyFedyunin fbshipit-source-id: 054b0c0884ac12de2dd1a92c5de916aaf047f9e9
@VitalyFedyunin merged this pull request in e0009fd. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Stack from ghstack:
sinh
andsinh_
from the TH to Aten (CUDA) #28527 Migratesinh
andsinh_
from the TH to Aten (CUDA)asin
andasin_
from the TH to Aten (CUDA) #28482 Migrateasin
andasin_
from the TH to Aten (CUDA)sin
andsin_
from the TH to Aten (CUDA) #28237 Migratesin
andsin_
from the TH to Aten (CUDA)Benchmark (Debian Buster, CUDA 9.2, Quadro P400, turbo off, Release, gcc 7.4):
Before:
After:
Close #24628
Differential Revision: D18124732