Repository navigation
Allow opt-out of some nice stateless RNG API properties for maximum perf - #177882
jbschlosser wants to merge 33 commits into
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/177882
Note: Links to docs will display an error until the docs builds have been completed. ❌ 14 New Failures, 1 Unrelated Failure, 1 Unclassified FailureAs of commit e791574 with merge base 20aa640 ( NEW FAILURES - The following jobs have failed:
UNCLASSIFIED FAILURE - DrCI could not classify the following job because the workflow did not run on the merge base. The failure may be pre-existing on trunk or introduced by this PR:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
Attention! native_functions.yaml was changedIf you are adding a new function or defaulted argument to native_functions.yaml, you cannot use it from pre-existing Python frontend code until our FC window passes (two weeks). Split your PR into two PRs, one which adds the new C++ functionality, and one that makes use of it from Python, and land them two weeks apart. See https://github.com/pytorch/pytorch/wiki/PyTorch's-Python-Frontend-Backward-and-Forward-Compatibility-Policy#forwards-compatibility-fc for more info. Caused by: |
ghstack-source-id: 45f7104 Pull-Request: pytorch#177882
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Attention! native_functions.yaml was changedIf you are adding a new function or defaulted argument to native_functions.yaml, you cannot use it from pre-existing Python frontend code until our FC window passes (two weeks). Split your PR into two PRs, one which adds the new C++ functionality, and one that makes use of it from Python, and land them two weeks apart. See https://github.com/pytorch/pytorch/wiki/PyTorch's-Python-Frontend-Backward-and-Forward-Compatibility-Policy#forwards-compatibility-fc for more info. |
|
Closing this because benchmarks show that the new APIs are generally faster than old torch random / randn APIs anyway |
Stack from ghstack (oldest at bottom):
Adds a flag
portable=Truespecifying whether to use the new kernels with nice properties. Settingportable=Falsecalls into existingtorch.rand()/torch.randn()kernels.Update: the normal / uniform generation kernels are now generally faster than
torch.rand()/torch.randn(), even with the nice properties, so I don't see much reason to introduce the portable flag.