Skip to content
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

move to count-space-exhaustive partitionable Threefry RNG random_bits #13040

Merged
merged 2 commits into from
Oct 29, 2022

Conversation

froystig
Copy link
Member

co-authored with @mattjj

Count space exhaustion is achieved by:

  • extending iota to arbitrary shapes (not lengths),
  • rendering the iota in uint64, then projecting it to a pair of uint32, and
  • using the projected pair as the counts for threefry.

Unlike before, this partitionable Threefry random_bits implementation is not bit-equivalent to the original (i.e. without the jax_threefry_partitionable config enabled). The two produce different random bits from the same RNG key.

@froystig froystig added the pull ready Ready for copybara import and testing label Oct 29, 2022
@froystig froystig requested a review from mattjj October 29, 2022 04:37
@froystig froystig self-assigned this Oct 29, 2022
@mattjj mattjj force-pushed the rng-part-bitschange-extents branch from e002512 to 213d2c8 Compare October 29, 2022 07:05
@copybara-service copybara-service bot merged commit 5b0cb11 into jax-ml:main Oct 29, 2022
@mattjj mattjj deleted the rng-part-bitschange-extents branch October 29, 2022 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants