-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Fixed CUDA randint generation for large ranges. #126066
Fixed CUDA randint generation for large ranges. #126066
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/126066
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (6 Unrelated Failures)As of commit b0b9064 with merge base 3d56673 (): FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following jobs failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
@r-barnes Thanks for reviewing, I added some type annotations and changed the C++ parameters to |
3ea6988
to
849bf9e
Compare
@pytorchbot rebase |
@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here |
Successfully rebased |
b09c3f1
to
cb7925c
Compare
303b76e
to
0a7226b
Compare
CC @drisspg who might know more about the SDPA tests |
Thanks @eqy. Those tests in |
ada1975
to
993afca
Compare
c6a34be
to
04e4e82
Compare
fdd1b56
to
21b653c
Compare
I finally found a way to satisfy all the tests. Do you want to have another look at the changes @eqy? Unfortunately, the |
be24f90
to
b49511c
Compare
@pytorchbot merge |
Merge failedReason: Approvers from one of the following sets are needed:
|
Can you have a look at this? @malfet |
…ons. Added tests for overlapping torch.rand/torch.randn random states.
b49511c
to
b0b9064
Compare
I need additional approval for this PR. Could either of you take a look at this? @lezcano @Skylion007 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving but didn't review. @eqy did.
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Fixes pytorch#125224 For large ranges, calls to CUDA `randint` use a different `unroll_factor` to generate random ints. This `unroll_factor` was not considered correctly in the calculation of the Philox offsets. Thus, some of the random states were reused, resulting in lower entropy (see pytorch#125224). This also affects multiple other random functions, such as `torch.rand` and `torch.randn`. Pull Request resolved: pytorch#126066 Approved by: https://github.com/eqy, https://github.com/lezcano
Fixes #125224
For large ranges, calls to CUDA
randint
use a differentunroll_factor
to generate random ints. Thisunroll_factor
was not considered correctly in the calculation of the Philox offsets. Thus, some of the random states were reused, resulting in lower entropy (see #125224).This also affects multiple other random functions, such as
torch.rand
andtorch.randn
.