-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalization errors were occuring when the state was jax and x64 mode was not enabled. Simply renormalizing the state did not help, as the norm only differed from 1 by machine precision. This PR simply defers sampling to jax whenever the state is jax. If a prng key is not provided, we just pull a seed from the numpy rng. Pulling a prng seed from the numpy rng will not be particularily jit-able, but if the user wants it to be jittable, they can provide a prng key instead. Fixes #6100 [sc-71361] --------- Co-authored-by: Mudit Pandey <[email protected]>
- Loading branch information
Showing
4 changed files
with
64 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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