-
Notifications
You must be signed in to change notification settings - Fork 74
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
Random must not ignore seed in multiple instances #417
Comments
Random only uses the static generator if This is from the unit tests for Random. I think it would reproduce this bug, if it existed:
|
yes, I was also looking into this and my description is imprecise. Still, in WIP PR #397 I had different results for these scenarios (compared with deterministic/"gold" check for SP/TM):
I'll verify if this is the case, or some other mistake on my side. |
Closing as won't fix, this was my mistake. The above scenario passes OK in both cases. The "bug" was that I had mismatch between hand-written values for SP, encoder outputs using different rng seed. |
Random should not use static members, esp
static_gen
andstatic_is_seeded
, otherwise the first instance of random sets the seed, but seed is ignored for any other random instance during the runtime!From Random.cpp
Example of the problem:
and
The text was updated successfully, but these errors were encountered: